ProTek2
10-07-2011, 03:54 PM
I need for the submission of an unvalidated from to reload the page to allow for php validation which, if passed, would use javascript to change the form's action to an external site.
First, is the following approach sound?
<script type="text/javascript">
if(my_php_validation_ok == true)
document.form.action="the_external_url"
else
document.form.action="current_page.php"
</script>
Second, how should the <form> action be styled to accomplish this?
First, is the following approach sound?
<script type="text/javascript">
if(my_php_validation_ok == true)
document.form.action="the_external_url"
else
document.form.action="current_page.php"
</script>
Second, how should the <form> action be styled to accomplish this?