IE Javascript Error : Object doesn’t support this property or method
February 18th, 2011 by NikhilHad this strange issue , where a piece of Javascript worked fine in all the browser  and as usual sans IE 🙂 …  Simple it was, but since the script was not written by me, It took a while to debug this “Object doesn’t support this property or method” error, that only IE was throwing up. Probably! If  I were to write the script, I wouldn’t have got this error at all , as I tend not to mix my variable names with field Ids :).
Problem: Object doesn’t support this property or method (on line 3)
function funzoneSP(){
document.getElementById('video_id').style.visibility="hidden";
shortdesc = document.getElementById('shortdesc').value;
....
}
Solution:
The error is generated on the thirdrow in the example above(Line 3… “shortdesc = document.getE….”). I tried all sort of stupid things , that I dont is even worth the mention here and finally guess what! Â just changing the shortdesc var to something else got rid of the error. Basically! The variable name had to different from the fieldID
Tags: IE Fixes
Subscribe to ExpressingIT by Email | Follow Me on Twitter