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

<!-- 
     js_form2.html

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

<head>
    <title> js_form2 </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_form2.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="13"
               value="type here">
    </form>

    <form>
        <input type="button" onclick="disp_alert()" 
               value="Display alert box">
    </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]: ",
                       document.forms[1], "</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>