Closed Bug 104904 Opened 23 years ago Closed 23 years ago

Javascript exceptions when dynamically generating select elements

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 52975

People

(Reporter: geoff.elliott, Assigned: john)

References

Details

Attachments

(1 file)

Attached HTML file generates three of the following type of errors (one for each
select element):

Error: uncaught exception: [Exception... "Failure"  nsresult: "0x80004005
(NS_ERROR_FAILURE)"  location: "JS frame :: reserve.html :: <TOP_LEVEL> :: line
XXX"  data: no]

The line numbers I get are 253, 283, and 302.  These numbers DO NOT make any
sense to me; the lines don't contain the same kind of code, and the last one
isn't even in the page (there are only 301 lines!).  

The code is intended to generate select boxes for Month, Day, and Time, based on
the current date.  

This page works on Netscape 4.76, Netscape 6.1, Mozilla prior to 0.9.4, and
IE5+.   In Mozilla 0.9.4 the option elements were generated without a problem,
but the select was set to the second item in the list instead of the first.  Now
in 0.9.5 the lists don't generate at all.
hey jkeiser, how's this on the branch?  :)  Looks like a possible dup of
everyone's favorite JS in select bug...
I agree; reassigning to HTML Form Controls. The issue described here
is a dupe of bug 100511


Sample of the HTML here:

<select>
  <script>
   with (document)
   {
    for (i = 0; i < monthsLength; i++)
    {
     writeln('<OPTION>' + monthList[i]);
    }

   writeln('</SELECT>');

 
          etc. 
          etc.
Assignee: rogerl → rods
Status: UNCONFIRMED → NEW
Component: Javascript Engine → HTML Form Controls
Ever confirmed: true
QA Contact: pschwartau → madhur
The report here is that "Now in 0.9.5 the lists don't generate at all."
In bug 100511 the lists generate, but you can't select any of the items.

So I will leave it to others to decide whether or not this bug is a
dupe of bug 100511. 
This doesn't look like a dup (right on Phil), but it's fixed in bug 34297 patch.
 I am not sure why it's fixed, and I am kinda scared to find out, so I'll just
set this dependent and have done with it.
Depends on: 34297
Fixed with bug 34297 landing.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 106735 has been marked as a duplicate of this bug. ***
*** Bug 105074 has been marked as a duplicate of this bug. ***
tested the attachement 53629 on win2000 buildID: 2001-11-08-06-trunk

Though I do not see any errors , I noticed the following:
1. I pull down the month select control and make a selection
2. I do not see my new selection showing in the select box - nor do I see the 
date select box changing.
3. I click on the month select pull down once again
4. The selection I made in step 2 shows up and the date select control also 
populates the new dates. 

This works fine on IE6.0

I am reopening this bug for further evaluation.


Status: RESOLVED → REOPENED
Resolution: FIXED → ---
to jkeiser
Assignee: rods → jkeiser
Status: REOPENED → NEW
Aha, probably a result of some flushes we removed when getting things performant
again.  Most likely, in fact, a particular flush that rods has found lacking. 
Minimizing the browser window and re-opening makes it show up again.  CC'ing JST
for good measure.
Status: NEW → ASSIGNED
I'm not so sure that this is due to the lack of a flush, it might be fixable by
adding more flushes, but that doesn't seem like the right solution to me. When a
new option is selected, the select frame should be nitified and it should
invalidate whatever needs to be reflown/repainted. A flush would only force
something to happen synchronously, but it should *not* fix a problem like this.
Maybe I'm blowing smoke here, but that's how I see this...
Removing the fieldset makes this go away.  Same symptoms as bug 52975.

*** This bug has been marked as a duplicate of 52975 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → DUPLICATE
(By the way, adding the flush back in didn't fix it either.)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: