Closed
Bug 69826
Opened 24 years ago
Closed 23 years ago
JS fails, works on NS 4.75
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.8.1
People
(Reporter: rickd, Assigned: harishd)
References
()
Details
(Whiteboard: [fix in hand])
Attachments
(3 files)
19.96 KB,
text/html
|
Details | |
286 bytes,
text/html
|
Details | |
656 bytes,
patch
|
Details | Diff | Splinter Review |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; 0.8) Gecko/20010215 BuildID: 2001021508 Changing the time or date in schedule listing causes JS code to notify user of error that date is out of range. NS 4.75 initializes date fields with current time, and allows you to pick valid ranges. Reproducible: Always Steps to Reproduce: You may want to start at http://www.directv.com and go to the schedule guide from there. Chaning the times and dates and pressing select will return a user error about the date being out of range.
Comment 1•24 years ago
|
||
Updated•24 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•24 years ago
|
||
(The reduced HTML testcase works better in Mozilla if you save source locally -) The problem seems to be this line in the HTML: document.GoToForm.time.selectedIndex = parseInt(Schedule_Date.getHours()); The site authors use this line to pre-select an acceptable lower value for the time selectbox. In NN4.7 and IE4.7 this succeeds; in Mozilla, it doesn't. In Mozilla, you get this error in the JavaScript Console: Error: document.GoToForm has no properties Source File: http://bugzilla.mozilla.org/createattachment.cgi?id=69826 line: 369 The HTML is all document.written, and the line above occurs during the middle of the document.write. That is, we haven't written the </FORM> tag for the "GoToForm", yet we are trying to set document.GoToForm.time.selectedIndex To make this explict, in the testcase I explicitly set: document.GoToForm.time.selectedIndex = 17 Sure enough, in NN4.7 and IE4.7, you see "5:00 PM" loaded in the time selectbox. But in Mozilla, it comes up with "12:00 AM". If you hit the Select button with "12:00 AM" as the time and "Feb 22" as the date, you get the "Selection exceeds schedule range" error from the site. This happens in NN4.7 and IE4.7, too. So the main problem is that the time (and date?) selectboxes fail to get initialized properly in the middle of the document.write -
Comment 3•24 years ago
|
||
This is not JS Engine; reassigning to Parser for further triage -
Assignee: rogerl → harishd
Component: Javascript Engine → Parser
QA Contact: pschwartau → janc
setting to m0.9
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
Phil: Is it possible to make the reduced test case a really reduced test case :-) Thanx
Is the problem similar to the following test case? <html> <head> <script> document.write("<FORM NAME=CLOCK><SELECT NAME=TIME><OPTION>opt 1<OPTION>opt 2<OPTION>opt 3</SELECT>"); document.CLOCK.TIME.selectedIndex=1; document.write("</FORM>"); </script> </head> <body> Opt 2 should be selected. </body> </html>
Comment 7•24 years ago
|
||
Harish: that's it exactly! Notice that when your testcase is brought up in IE4.7 or NN4.7, option 2 is selected. But in Mozilla, option 1 appears instead, and you get this error in the JavaScript Console: Error: document.CLOCK has no properties Source File: (path to your testcase) Line: 5 That is exactly what's causing the problem reported in this bug -
Comment 8•24 years ago
|
||
Assignee | ||
Comment 10•24 years ago
|
||
Assignee | ||
Comment 11•23 years ago
|
||
FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 12•23 years ago
|
||
(This is rickd@thebox.com) It's fixed. But now the area around the combo boxes have some ugly repaints when a selection is made.
Comment 13•23 years ago
|
||
Verified on: build: 2001-03-29-09-Mtrunk Platform: Win NT the above url and harish's test case both works fine.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•