Web Development for 2012

Alexander Dickson - Web Developer covering PHP, jQuery / Javascript, XHTML, CSS, more

Articles

How to make a comparison between jQuery objects

Filed under jQuery / JavaScript. Published on Tuesday, 13th October 2009.

In my day to day jQuery programming, I often come across a comparison that would be a lot easier if I could just compare the 2 jQuery objects I have. With this short amount of code, you can!…

A new way of creating objects in JavaScript

Filed under jQuery / JavaScript. Published on Thursday, 8th October 2009.

Although I've been using JavaScript for years, the way I've gone about it has evolved greatly over time. There are a few methods of creating objects that I would like to explain. I'm going to demonstrate the different ways by doing the same thing, that is, a simple wrapper for the console.log() method provided by Firebug. It will allow you to call init() to initialise wther the wrapper will use console.log() or alert(), and it will provide public methods to addMessage(), print() and printAll().…

Helping increase your link juice

Filed under SEO. Published on Tuesday, 15th September 2009.

These days, SEO is very important, and links on your page are an important part of improving your rankings. It is important to know a few things about the links on your page and how to improve them.…

Redirecting from an old URL to a new one

Filed under Apache. Published on Sunday, 13th September 2009.

Sometimes, it is necessary to moves the files or somehow change the URL of a page. To help SEO, help prevent link rot and in general be of assistance to your site's visitors, it is important to not let the old URLs become dead links. This is easy using a few lines in your .htaccess file. If you have access to Apache's httpd.con, you can place the redirects there.…

Exiting a loop early

Filed under PHP. Published on Friday, 14th August 2009.

Sometimes, when using a loop in PHP, you think to yourself "If this was a function, I could return here and not have to process the rest of this loop block". This sort of functionality inside of a loop is achievable, by using the break and / or continue statement.…

Determine if a jQuery selector found any objects

Filed under jQuery / JavaScript. Published on Friday, 14th August 2009.

Sometimes, it's useful to know how many objects were matched with a jQuery selector. This is rather easy by accessing the length property of the object. This is also something that makes jQuery useful - the object returned by a selector has array like properties.…

Displaying a small icon next to an external link

Filed under xHTML / CSS. Published on Friday, 14th August 2009.

As an added aid for usability, it is useful to add a small icon next to external links to let users know that the link will take them off the site.…

Best practices for formatting a URL with a numerical index

Filed under General. Published on Monday, 3rd August 2009.

A lot of the time, using pure clean URLs are impossible due to certain limitations such as the possibility of the segment mapping to more than one resource. In this case, the URL must contain an ID (generally the ID in the database).…

Stack Overflow Profile

view full profile »

About

I'm a web developer from the Sunshine Coast, Australia. more »