![]() |
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!? |
ugh it didnt show up
here it is !-- //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 ); } } //-- |
hit me up on icq at 237842929 you cannot have the action mailto, who the hell told you that?
|
Here's a good site. WebMonkey
|
Take away the submit button and just use a regular button. Put the onClick() event on the regular button and label the button "submit".
SpaceAce |
space ace i tried that, will you please icq me?? i need to have this done fast for school i can go back and actually learn it later :(
|
nevermind i just did something (not quite sure what) and its working now :1orglaugh
|
wait a minute where do i actually have it submit the form though???
|
All times are GMT -7. The time now is 08:13 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123