News Flash: IE getElementById Invaded By Form Field Names!

October 17, 2008

If document.getElementById() isn’t returning the results in IE that you expect, checkand see if you have any form fields with that name. It seems like IE returns them from getElementById() – even if you manually give them an ID different from the name, that doesn’t conflict! Your only hope seems to be renaming the element you need to select, so that it doesn’t have the same name as any of your form fields.