Most web browsers with the exception of Internet Explorer understand
Javascript and so the original unmodified code worked properly in all of those
browsers. Internet Explorer doesn't understand Javascript. Instead it treats
any Javascript as if it were Microsoft's proprietary language JScript and
processes it accordingly thus giving errors in IE when you use the same name
for a variable as has been assigned within the web page source. were
Microsoft's proprietary language JScript and processes it accordingly thus
giving errors in IE when you use the same name for a variable as has been
assigned within the web page source.
just goes to show that even when you make a trivial change to your script
that you know will have absolutely no effect when the script is processed as
Javascript that you will still need to retest the script on IE in order to ensure
that you haven't fallen foul of one of the many annoying "features" of JScript.