Closed
Bug 40019
Opened 25 years ago
Closed 25 years ago
JavaScript error in Mozilla and not in Netscape
Categories
(Core :: DOM: HTML Parser, defect, P3)
Tracking
()
People
(Reporter: bugzilla, Assigned: harishd)
References
()
Details
Attachments
(2 files)
if you go to:
http://search.support.microsoft.com/kb/c.asp
you'll get a
JavaScript error:
http://search.support.microsoft.com/kb/include/ENG/GN/C/cform.js line 103: docum
ent.forms[0] has no properties
you dont get this error in either IE or Netscape 4.73
Comment 1•25 years ago
|
||
What build ???? Please INCLUDE the build ID when submitting bug reports. This
worksforme in build 52020 - Win98SE and NT 4.0
Reporter | ||
Comment 2•25 years ago
|
||
In build 2000052020.
The error is in the JavaScript console.
Comment 3•25 years ago
|
||
This javascript error message is also seen on PC/Linux, build 2000052109.
OS: Windows 2000 → All
Comment 4•25 years ago
|
||
Sorry for the delay - taking over QA for the JavaScript Engine group -
I am not able to access the js file in question:
http://search.support.microsoft.com/kb/include/ENG/GN/C/cform.js
Without seeing the code, unfortunately there is no way to understand the bug.
It may not even be an issue purely of the JS Engine, but a DOM issue.
Is there a JS script that can reproduce this bug, and is accessible?
Reporter | ||
Comment 5•25 years ago
|
||
Comment 6•25 years ago
|
||
Henrik - thank you for attaching the cform.js file !!!
The HTML file of the given Web page calls functions in cform.js
It includes them via:
<SCRIPT LANGUAGE="JavaScript" SRC="/kb/include/ENG/GN/C/cform.js">
</SCRIPT>
The JavaScript error in cform.js is occurring on the line
document.forms[0].LQ.value = strDefaultLQ ;
because JavaScript is not seeing "LQ" as a previously-defined
property of document.forms[0].
If there were a static element in the HTML file, such as:
<INPUT NAME='LQ' SIZE='49' TYPE='text'>
then document.forms[0].LQ would be defined, and the above line would not error.
However, the INPUT element is being created dynamically, by code in cform.js:
document.write(htmlStr);
where htmlStr= (etc. etc.) +
"<TD VALIGN='middle'><FONT FACE='Verdana,Arial,Helvetica' SIZE='2'>
<B>My question is:</B></FONT><BR>" + formGetLQ()
+ (etc. etc.)
The formGetLQ() function is back up in the HTML file:
function formGetLQ()
{
return "<INPUT NAME='LQ' SIZE='49' TYPE='text'
ONFOCUS='SetFocus()' MAXLENGTH='100' VALUE='" + "" + "'>";
}
Somehow we not resolving all of this completely - is this a Parser issue?
Do not believe it is a problem purely of JS Engine...
Assignee: rogerl → rickg
Component: Javascript Engine → Parser
QA Contact: pschwartau → janc
Comment 7•25 years ago
|
||
(Reassigned to Parser component)
Harish -- please take a look. This could be us, or just the JS engine.
Assignee: rickg → harishd
Reporter | ||
Comment 9•25 years ago
|
||
Reporter | ||
Comment 10•25 years ago
|
||
Sorry for the spam.. Forget the last test case attacment. It's wrong. I'll
investigate more...
Comment 12•25 years ago
|
||
Yup, this is bug 4891. The fix in my tree makes the warning go away. Marking
this one a duplicate!
*** This bug has been marked as a duplicate of 4891 ***
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 13•25 years ago
|
||
Thanx Eric :)
Comment 14•25 years ago
|
||
Verifying as a duplicate of 4891
'document.forms[x] not defined if form is document.written out'
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•