Javascript is unpredictable
Posted: Tue Mar 01, 2005 5:34 pm
5 min ago, i was trying to build a new script.
I typed into the address bar and poped up a new window.
Now when i type that same code, i got error!
"expected identifer"
if the change "new" to another variable name, it works fine.
Then i change it back to "new" and I got the same error.
How is that...
2.I have a code with some errors. In different days it would return different errors.
3. new=window.open('index.php'); void 0;
then i type
and got an error says syntax error!
if i remove "new." then syntax error is gone.
So i concluded that using "document" as a property of an object will cause an syntax error???
I typed
Code: Select all
javascript:var new=window.open('index.php'); void 0;Now when i type that same code, i got error!
"expected identifer"
if the change "new" to another variable name, it works fine.
Then i change it back to "new" and I got the same error.
How is that...
2.I have a code with some errors. In different days it would return different errors.
3. new=window.open('index.php'); void 0;
then i type
Code: Select all
new.document.formsї0].submit(); void 0if i remove "new." then syntax error is gone.
So i concluded that using "document" as a property of an object will cause an syntax error???