Closed Bug 6154 Opened 25 years ago Closed 25 years ago

engine not defined error

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Other
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: trajano, Assigned: vidur)

Details

Attachments

(2 files)

Hi, I was wondering why I get an engine not defined message when I try to execute a javascript that is inline with the form <form ... onSubmit="xxxyyyzzz..."> I have no problems with <script language="JavaScript"> but how do you handle pages that use the format of the first one. Unless of course it is illegal by W3C standards then I would understand. Thanks, Archie
Assignee: norris → vidur
Component: JavaScript → DOM Level 0
Status: NEW → ASSIGNED
Target Milestone: M7
Gecko isn't doing the right thing with unqualified references inside form elements. You'll probably find that this works correctly if you reference the select element as "this.engine" instead of just "engine". Thanks for the bug - good catch!
QA Contact: cbegle → desale
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fix checked in on 6/14/1999. The unqualified reference to "engine" is now resolved correctly. Also implemented select.value. Note that the attached test case has a problem because we can't find the linked style sheet. To run this, the attachment should either remove the reference to the style sheet or maybe the bug reporter can provide a URL.
Attached file The style sheet as requested (deleted) —
Could not open the attachment. It says file not found on server. trajano, could you please, try to attach it once again or copy the code or verify the bug. I tried to test it with following code and I did not get any error. <html> <head> <title>Testing</title> </head> <script> <!-- function CheckData(){ if (document.workform.testing.value.length == 0){ alert("Please Enter Some Data"); } } //--> </script> <body > <form name="workform" onSubmit="CheckData();" method="post" action="test.cgi"> <input type="text" name="testing" value=""> <input type="submit" name="but1" value="Submit"> </form> </body> </html> Please test with your testcase.
Vidur, Could you please verify this bug ? or atleast let me know my test case is correct or not ?
Status: RESOLVED → VERIFIED
The test isn't quite right. To test the bug, change your onsubmit() handler to be "alert('The input is: ' + testing.value);". If that works, mark it as verified.
Thank you vidur.
Tested it. Everything is working fine now.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: