Rockstar Web Developer

Internet Explorer & Elements with an ID get a matching global variable in JS

Published on November 26, 2010 by , in Javascript
Object doesn't support this property or method

If you’re getting an odd behavior on your scripts in Internet Explorer, try adjusting their name (for example by adjusting their names with a unique prefix) just to make sure that there isn’t any element in the page you’re working on with the same ID as your variable name.

Object doesn't support this property or method

If you want to read a much elaborate explanation, go check out Rick Strahl’s post here: Internet Explorer Global Variable Blow ups, but the above should get you going in no time (and help you avoid some headaches).

FavoriteLoadingAdd to favorites

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent writings