views:

35

answers:

1

Messing with some javaScript, I found that the variable name "item" was already being assigned before I declared it or assigned anything to it. Tracing it backwards, I found that it even seemed defined before I did ANYTHING in js. To verify this, I even put

<script>alert(item);</script>

on a line by itself IMMEDIATELY after opening the HEAD tag - upon loading the page, I get an alert box with the following:

"[object]"

If I do the same thing in FF, I get an error, saying that "item" is not defined.

Where is "item" coming from in IE?

+3  A: 

Check this out >> "item" is a reserved keyword in IE

Shankar Ramachandran