What I want is to send them to a New web page once they have actually entered something.
I have tried <a href....but it appears on the page; I don't want that. I just want an automatic change to the new page after the button has been pressed and a valid input has been made.
---------------------------
Expand|Select|Wrap|Line Numbers
- <script type = "text/javascript">
- function validate(){
- // get inputs
- name = document.getElementById("txtName").value;
- //create an empty error message
- errors = "";
- //check name - It simply needs to exist
- if (name == ""){
- errors += "Please supply an answer…….. \n";
- }
- //end if
- //check for errors
- if (errors == ""){
- //process the form
- } else {
- alert(errors);
- } // end if
- } // end function
- </script> </head> <body> <h1>Frame...</h1> <h3><center>Mary had a _________ whose fleece was white as _______</h3> <form action = "http://example.com/"> <fieldset> <label>Name</label> <input type = "text"
- size=75S%
- value = ""
- id = "txtName" /> <button type = "button"
- onclick = "validate()">Check Your Answer </button>;
- </fieldset>