Please send questions to st10@humboldt.edu .
<html>

<!-- 
     js_form4.html

     by: Sharon Tuttle
     last modified: 09-12-06
-->

<head>
    <title> js_form4 </title>

    <script type="text/javascript">
        <!--
        // function: disp_alert
        //
        // display a self-descriptive alert popup
 
        function disp_alert()
        {
            alert("I am an alert box!!")
        }

        // function: list_form_elements
        //
        // display the elements of a particular form

        function list_form_elements(aForm)
        {
            document.write("<li> aForm.elements.length: ",
                       aForm.elements.length, "</li><br>")
	    for (var i = 0; i < aForm.elements.length; i++)
            {
                document.write("<li> aForm.elements[", i,
                               "].type: ", aForm.elements[i].type, "</li><br>")
            }
        }
        //-->
    </script>

</head>

<body>
    <h3> js_form4.html </h3>

    <h4> (adapted by Sharon Tuttle, last modified 09-12-06) </h4>

    <hr>

    <form action="http://www.humboldt.edu/~st10"
          method="get"
          name="firstFormWithTextBox">
        <input name="desiredPhrase"
               type="text"
               size="13"
               maxlength="10"
               value="type here">
        <input name="howMany" type="text" size="5" maxlength="5"
               value="0">
        <br>
        <input type="submit" value="SUBMIT ME">
        <input type="reset" value="CLEAR FIELDS">
    </form>

    <hr>

    <form name="buttonsForm">
        <input type="button" onclick="disp_alert()" 
               value="Display alert box">
        <br>
        <input name="quantity" type="text" size="10" maxlength="10">
        <br> 
        <input type="button" 
               value="Useless button">
    </form>

    <hr>
    <h4> Information about this page's forms: </h4>
    <ul>
    <script type="text/javascript">
        <!--
    
        document.write("<li> This page contains ",
                       document.forms.length, " forms </li><br>")

        document.write("<li> FIRST FORM: </li>")
        document.write("<ul><li> document.firstFormWithTextBox.name: ",
                       document.firstFormWithTextBox.name, "</li><br>")
        document.write("<li> document.forms[0].name: ",
                       document.forms[0].name, "</li><br>")
        list_form_elements(document.firstFormWithTextBox)
        document.write("</ul>")

        document.write("<li> SECOND FORM: </li>")
        document.write("<ul><li> document.forms[1].name: ",
                       document.forms[1].name, "</li><br>")
        list_form_elements(document.forms[1])
        document.write("</ul>")

        //-->
    </script>
    <noscript> 
        <li> Your browser does not support JavaScript, or has it disabled;
             <br> 
             please note that, as a result, this page will not work. </li> 
    </noscript> 
    </ul>
    <hr>

</body>
</html>