Closed Bug 3369 Opened 26 years ago Closed 26 years ago

javascript exits function prematurely

Categories

(MozillaClassic Graveyard :: Layout, defect, P2)

1998-03-31
x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: morse, Assigned: pollmann)

References

()

Details

Using the content shown below and pressing the button being displayed, only the first of three consecutive alerts appear. In 4.5, all three alerts appear. It seems that the "clicker" function is exiting prematurely. Note: I have a workaround so this is not a blocking problem. The work-around is to remove the comment on line 13 and to comment out line 12. By putting assigning a value to "fillins", all three alerts appear. Unfortunately the value displayed by the second alert is giving null rather than the value "hello" but that will be reported as a separate bug (see bug 3368) <HTML> <HEAD> <SCRIPT> button_frame = 0; function loadButtons(){ top.frames[button_frame].document.open(); top.frames[button_frame].document.write( "<FORM name=buttons>" + "<INPUT type=BUTTON value=OK onclick=parent.clicker()>" + "<INPUT TYPE=HIDDEN NAME=fillins SIZE=-1>" + // "<INPUT TYPE=HIDDEN NAME=fillins value=\" \" SIZE=-1>" + "</FORM>" ); top.frames[button_frame].document.close(); } function clicker(){ var fillins = top.frames[button_frame].document.buttons.fillins; fillins.value = "hello"; alert("before using fillins.value"); alert("fillins.value="+fillins.value); alert("after using fillins.value"); } </SCRIPT> </HEAD> <FRAMESET ROWS = 25,25 onLoad=loadButtons()> <FRAME SRC=about:blank> <FRAME SRC=about:blank> </FRAMESET> <NOFRAMES> <BODY> <P> </BODY> </NOFRAMES> </HTML>
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
This was a dup of bug 3368 and is now fixed.
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.