typeof *always* returns a non-empty string, so that condition is vacuously true. Try attaching a real testcase of what you think should work -- and file the bug against DOM Level 0 if you are complaining about DOM, not JS engine, issues. /be
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
Joe: try to learn, that's all we can ask if you want to participate in bugzilla and be effective. I'm not asking you to go back in time and fix the misfiled bug, I'm telling you something for next time. In what other browsers have you tested? Sounds like only in IE. IE puts forms and other named elements in the window scope, so you can say "foo" and mean the form named document.foo in all browsers since Netscape 2. Please do not use the IE-only way of naming forms; just use document.foo for code that works in all browsers. Also, your script comes before the form, which means you are assuming the document object model is built before scripts run. That too is not a portable assumption. This is a dup of the bug about Mozilla not emulating IE's non-standard pollution of the window scope with named document objects. /be
As far as the location of the script. It can go anywhere in the page, because the page needs to be loaded before someone can click the button to execute the script. That's really neither here nor there as that is not the issue. IE and Konqueror 3.2 BOTH seem to work with this behavior so I guess they both put the elements in the window scope. I do code using document.formName.foo. If you read this whole post, including the title you would see that it says: logon fails to exchange server unless full DC is specified its not MY js that's broken, its Microsoft Exchange Server that is doing this in SBS 2003.
You need to log in before you can comment on or make changes to this bug.