IE 6 javascript onchange() problem
February 6th, 2008
I really hate IE6, but as it is still so common it is important to support it. I recently ran into a problem with the javascript onchange function. I was using onchange to update a text box on the page when the check box was selected. I was using “…onchange(this.checked)…” This worked fine for everything except IE6. It turns out that IE doesn’t fire the onchange state until the checkbox loses focus and so my update was not occurring.
The simple way around for this problem was to change onchange() to onclick(). The function now works in all browsers.
Sphere: Related ContentBest Javascript compressor to use
December 18th, 2007
I recently had a relatively large javascript (14KB) that I want to compress down. There are a lot of online JS compressors out there unfortunately not all of them actually work. After testing around a dozen of them I found the best two are JavaScript Utility and Javascript Compressor. JavaScript Utility was able to compress down my code to 5.0KB while Javascript Compressor compressed down to 6.3KB.
While both are good I would recommend using Javascript Utility, not only because it achieved a better compression ratio, but it also has a large number of other JS utilities that are worth using (especially JSLint). The only problem I found is I was only able to get the UTF-8 encoding option to actually run.
Sphere: Related Content