Add options to an HTML select box with Javascript

This Javascript post was going to be about language selection in FCKEditor from a drop down box as a follow up to the previous FCKEditor post but I’ve decided to postphone that post until Friday and look at how to add options to an HTML <select> drop down box with Javascript, because the next FCKEditor post will be doing just that.

jQuery’s document ready initialization

jQuery has a $(document).ready() function which is invoked after the DOM is loaded and before the page contents are loaded. It means you don’t have to have body onload events and can completely remove all Javascript from your HTML by attaching events to elements independent of the HTML after the DOM has loaded.

Show and hide an element with jQuery

jQuery is a powerful Javascript library which makes adding useful Javascript stuff to your website easy across browsers. This post looks at how to show and hide an element with jQuery using the show(), hide(), toggle(), fadeIn() and fadeOut() functions.

How to get the timezone offset with Javascript

There may be times when you want to work out what the difference in timezone is between the web browser client and the web server. This is possible using the Javascript Date object’s getTimezoneOffset() function.

Loading content with jQuery AJAX and dealing with failures

Some of the last few jQuery posts on this blog have looked at loading content with jQuery AJAX, selecting the element to inject and using a loading image. In these posts I incorrectly noted that the .load() method does not allow for error reporting and therefore you cannot deal with failures so another method would be required. Having had a better read of the jQuery docmentation I now know youcan deal with failures when using .load() so this post looks at how to do this.