This form works with two caveats: 1. To get the document.write in myButton2's event handler to work you need the line break. 2. The document.write in myButton2 overwrites the form --- it disappears.