Closed Bug 3368 Opened 26 years ago Closed 26 years ago

javascript prints out wrong value

Categories

(MozillaClassic Graveyard :: Layout, defect, P2)

1998-03-31
x86
Windows NT

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: morse, Assigned: pollmann)

Details

Using the content shown below and pressing the button being displayed, the value
of null is printed out rather than the correct value of "hello".  Under 4.5, the
value "hello" is indeed printed out.

This bug is currently blocking development of client-side wallet.

<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 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("fillins.value="+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>
See related bug 3369
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Just checked in a fix.
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.