phpretard Posted October 22, 2007 Share Posted October 22, 2007 Sorry, the last post didn't have my true scrip on it. This won't call the javascript...Anyone know why? echo"<form method=\"post\" name=\"bd\" action=\"rsvp_bday.php\" style=\"width:250\" onsubmit=\ "return validateForm(bd)\">"; -Anthony Link to comment https://forums.phpfreaks.com/topic/74376-php-javascript-mixed-validation/ Share on other sites More sharing options...
marcus Posted October 22, 2007 Share Posted October 22, 2007 onSubmit=\"return validateForm('this.form')\" no idea how the JS is setup. Link to comment https://forums.phpfreaks.com/topic/74376-php-javascript-mixed-validation/#findComment-375772 Share on other sites More sharing options...
phpretard Posted October 22, 2007 Author Share Posted October 22, 2007 Here it is <script language="javascript" type="text/javascript"> function validateForm(bd) { if(""==document.forms.bd.guest.value) { alert("We need to know how many will be are coming."); return false; } if(""==document.forms.bd.comment.value) { alert("Please send us a message with your R.S.V.P."); return false; } } </script> Link to comment https://forums.phpfreaks.com/topic/74376-php-javascript-mixed-validation/#findComment-375776 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.