pnj
Oct 30th, 2000, 12:13 PM
I asked this in VBscript forum, I guess I should have asked it here.
I have a form w/ 15 text box's.
four of those text box's are part of an address,it is not a required part of the form but I want to see if the users fills out any part of the address then alert them to fill out all fields.
I can do this w/ long hand like this:
if
(document.form.address.value!=0 &&
document.form.city.value ==0 &&
document.form.zip.value ==0)
{
alert("fill out the city please")
document.form.city.focus();
return false;
}
but I would like to use an array and loop through the fields in that manner.
any suggestions?
thanks
I have a form w/ 15 text box's.
four of those text box's are part of an address,it is not a required part of the form but I want to see if the users fills out any part of the address then alert them to fill out all fields.
I can do this w/ long hand like this:
if
(document.form.address.value!=0 &&
document.form.city.value ==0 &&
document.form.zip.value ==0)
{
alert("fill out the city please")
document.form.city.focus();
return false;
}
but I would like to use an array and loop through the fields in that manner.
any suggestions?
thanks