View Single Post
Old 10-24-2003, 01:36 AM  
aaron
Confirmed User
 
Industry Role:
Join Date: Mar 2003
Location: USA
Posts: 4,452
quick hahahahahahahahahaha question

<!--

//define the function

function checkForm(formName) {

//state that contactinfo is each feild on the form

for( var contactinfo = 0; contactinfo < document.forms[formName].elements.length; contactinfo++)

//if any fields are blank

if ( document.forms[formName].elements[contactinfo].value hahahaha '' )
{
document.forms[formName].elements[contactinfo].focus();

//alert the user which fields they did not fill out

alert( 'Please fill in your ' + document.forms[formName].elements[contactinfo].name );
}


}
//-->


im using this like this >>

form name="form" action="mailto:[email protected]" method="post" OnSubmit=checkForm("form")









so - when i click submit it goes through and it alerts what fields are missing input but what do i need to do to make it so if the alert comes up it stops and doesn't submit!?
aaron is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote