Wishing I had a cute phrase here.

  • Contact
  • Projects
  • Blog
  • About

Happy New Year and IE Fun

By Jeffrey Price on January 1, 2007 12:18 PM | Permalink | Comments (0) | TrackBacks (0)
One of my 2008 resolutions is to restart my blog and focus it on software development. Mostly Coldfusion, javascript, AJAX and general web development.

To kick off the new year, I'll discuss something I learned about IE today that was making my life miserable. Actually, it's something IE did right and everyone else does wrong.

I had some javascript that would check a radio button or check box and enable (or disable) an "Other (Specify)" box on a survey. Being the smart guy I am, I figure I can use the onChange() function since I only care when the field has changed value. Works great in all the browsers I tested except IE. It turns out that IE has a slightly different implementation of onChange(). To make a long story short, in IE, onChange() doesn't fire until an INPUT element loses focus and has changed it's value. This means that the element firing the event is the old radio button or checkbox, not the new one that was just clicked! This is actually the correct behavior (as far as I can tell) and the other browsers have it wrong. My problem was easily corrected by using onClick() .

0 TrackBacks

Listed below are links to blogs that reference this entry: Happy New Year and IE Fun.

TrackBack URL for this entry: http://www.ijeff.com/cgi-sys/cgiwrap/jprice/managed-mt/mt-tb.cgi/1

Leave a comment

Search

About this Entry

This page contains a single entry by Jeffrey Price published on January 1, 2007 12:18 PM.

See ya later Agregator is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

  • Subscribe to feed Subscribe to this blog's feed
Powered by Movable Type 4.01
Powered by Movable Type Publishing Platform
This blog is licensed under a Creative Commons License.