Exercise Time! 11



Reproduce the following forms:
  1. A single text entry goes here:
    Note that it has no default value.
    To submit, press this button:


  2. Pizza Internet Delivery Service

    Your address:
    Your phone:

    What toppings would you like?

    1. Pepperoni
    2. Sausage
    3. Mushrooms

    How would you like to pay?

    1. Cash
    2. Check

    Would you like the driver to call before leaving?

    Yes
    No



  3. Which of the following books have you read?

    Please enter your comments about each book below:


Create a form with two elements -- a and a button. In the selection list, have at least two HTML files you have created as options. When the user pushes the "Load the File!" button, have the selected html file load.
You will need the following JavaScript code somewhere in your HTML file: <SCRIPT LANGUAGE="JavaScript"> <!-- function loadpage() { var x = document.myform.myfile.selectedIndex; window.location.href = document.myform.myfile.options[x].value; } //--> </SCRIPT>

The form's NAME attribute must be "myform", and the NAME attribute of the SELECT option must be "myfile". The VALUE attribute of each OPTION you add should be the name of the HTML file to load, such as "index.html".

Use the following to create the button:

<INPUT TYPE="button" VALUE="Load the File!" onClick="loadpage()">