PDA

Click to See Complete Forum and Search --> : Text box function (to see if they wrote something)


Evan
Jul 3rd, 2000, 10:21 AM
I need to make sure the person
filling out the form on my website
actually wrote there info down.

So .. I need to function to check
all the text boxes.. and then when
down .. if a text box is empty goto
filledwrong.htm, if all full goto
the sendemail CGI

thanks!

rino_2
Jul 3rd, 2000, 05:03 PM
Hi Evan,

Lets say that there are two text boxes that need filling in, and a submit button to continue:

------------------------------------------------------
<SCRIPT LANGUAGE="JAVASCRIPT"><!--

function Submit() {

If (textbox1.value == "" OR textbox2.value == "") {
//Enter code to goto webpage or
//Have a messagebox popup like so:
Alert("Warning, All fealds must be filled in!")
}
else {
//Add code to goto page
}
}

--></SCRIPT>
------------------------------------------------------
[hr]

Hope it helps.