Skip navigation

Sign up | Lost password? | Help

Hello World

Practical programming... and stuff...

Posts tagged with "javascript"

How to improve your JavaScript

,

There's a lot of resources on the internet related to coding JavaScript, but many of them are poor and out of date, which I believe is one of the reasons why a lot of people still can't manage to write JavaScript code which works in all major browsers (IE, Firefox, Opera and Safari - where possible to test it)

Let's check out some useful JavaScript resources to improve our skills, ranging from books to blogs and frameworks/libraries.

Read the rest of the post at codeutopia.net

How to make a modal AJAX login box with Mootools

Sometimes I've been asked to do a modal AJAX login box for a website. What is that you ask?

It's basically what you can do in JavaScript with alert() but with different functionality: If you do alert('foo'), you get a box with text "foo" that you must close before doing anything else. This kind of dialogs are called modal dialogs.


In this post I'll show you how to make a modal login box that can work nicely even in browsers without proper JavaScript support. This is quite easy with the proper tools.

For this article, you will just need to know some HTML and JavaScript.

Read more...

Lively Kernel - Another waste of time?

, , ,

Sun Labs recently introduced Lively Kernel, which is an attempt to treat web applications in a similar way as desktop applications are programming-wise.

The Lively Kernel places a special emphasis on treating web applications as real applications, as opposed to the document-oriented nature of most web applications today. In general, we want to put programming into web development, as opposed to the current weaving of HTML, XML and CSS documents that is also sometimes referred to as programming.

Says it the best. Despite sounding interesting, this may all be a big waste of time.

Read more...

Enhancing site navigation with JavaScript without sacrificing usability

,

In the comments of my previous post there was some discussion about JavaScript not being very suitable for making navigating a site easier.

This is true to a certain extent: It's very easy to break opening links in new tabs for example and copying link URL's. However, it's possible to make usable JavaScript enhancements.

The key is the onclick-event.

Read more...

An easy way to remove nested elements in HTML

, ,

I've sometimes faced the problem: How to remove nested elements from HTML source.

You have two options:
- If it's well formed HTML, you can use XML parsing functions.
- If not, you're left with traditional string-parsing approaches.


When you think about the second option, you probably think of something that keeps track of how many opening tags we have gone past and how many endings, ie. the depth.

That is, however, very complicated compared to the approach I'm going to show you.
Today it struck me: why not do it in reverse?

Read more...

Opera Developer Tools vs. Firebug

, , ,

When working on more complex websites, a lot of time goes to working out some CSS for the layout, finding and fixing bugs in the JavaScript etc.
There are some tools available to help you with these tasks and today I'll have a look on two:

Opera's new developer tools and Firefox's Firebug.

Both very good tools for helping debug problems in your website... but which one is better and why?

Read more...

Rich typography for the web

, ,

Many who have worked on websites or even just visited them probably know how most of the fonts used in websites are the same ones.

This is because you have to use "common" fonts or otherwise users who don't have them will see the page in some other font and that may look even worse than using some of the common ones.


But in to the rescue comes sIFR!

Read more...