PDA

View Full Version : urgent!!


charon
10-04-2002, 09:23 AM
mai i know what is the possible problem cause my document.form.submit() can't give any response:
below is my code, I never face this problem before

<Script Language = "javascript">

function validateT()
{
if (document.formreg.name.value == "")
{
alert("Please fill in your name.");
document.formreg.name.focus();
}
else if (document.formreg.title.value == "")
{
alert("Please fill in the title.");
document.formreg.title.focus();
}
else if (document.formreg.address.value == "")
{
alert("Please fill in your address.");
document.formreg.address.focus();
}
else if ((document.formreg.telno.value != "") & (isNaN(document.formreg.telno.value) == true))
{
alert("Invalid contact number. Example:0123333888.");
document.formreg.telno.focus();
}
else if ((document.formreg.faxno.value != "") & (isNaN(document.formreg.faxno.value) == true))
{
alert("Invalid fax number. Example:031111888.");
document.formreg.telno.focus();
}
else
{

document.formreg.submit();
}
}
</Script>

glenngv
10-04-2002, 10:15 AM
oh really urgent you posted it twice! :eek:
http://codingforums.com/showthread.php?threadid=7365

anyway, dont panic.
how did you call the function and is the name of the form correct?

charon
10-04-2002, 11:31 AM
hehehe...u are extremely right, I'm panic alreday as My I need to upload the file immmediatly, luckly I manage to handle it. I also don't know what is the exact error, I just cut and paste the old coding (the same code which I use for testing before).

thanks a lot!!!!

beetle
10-04-2002, 03:15 PM
fValidate! (http://www.peterbailey.net/fValidate)