خرید بک لینک

Vote count: 0

I am making a health questioaire, I am having a few problems with it. The main problem is the submit button wont work. Can someone tell me why it isnt working?

The code I have is: Assignment 4


Please enter the following details:

First Name:
size="20" maxlength="20">

Suame:
size="30" maxlength="20">

Age:

Address Line 1:

Address Line 2:

City:

County:

Post Code:

function validateForm_onclick() { var myForm = document.form1; if(myForm.txtAge.value === "" || myForm.txtFirstName.value === ""|| myForm.txtSurName.value === ""|| myForm.txtAddressline1.value === ""||

myForm.txtAddressline2.value === ""|| myForm.txtCity.value === ""|| myForm.txtCounty.value === ""|| myForm.txtPostCode.value === "")
{
alert("Please complete all of the form");
if(myForm.txtFirstName.value ==="")
{
myForm.txtFirstName.focus();
}
else
{
myForm.txtSurName.focus();
}
else
{
myForm.txtFirstName.focus();
}
else
{
myForm.txtAge.focus();
}
else
{
myForm.txtAddressline1.focus();
}
else
{
myForm.txtAddressline2.focus();
}
else
{
myForm.txtCity.focus();
}
else
{
myForm.txtCounty.focus();
}
else
{
myForm.txtPostCode.focus();
}
}
else
{
alert("Thanks for completing the form " + 
myForm.txtName.value);
}
}
</script
</form>
</body>

I need to also keep the sizes on the names but need to hide that from the user. Can someone give me some advice on how to change this?

asked 3 mins ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 4 اسفند 1394 ساعت: 18:56

صفحه بندی