R
Randell D.
Folks
I have the following code for my submit button
<input type="submit" name="action" value="Save Article"
onClick="this.value='Saving...'; performPrePostChecks();">
I have tested performPrePostChecks() - Its a long script, but I have proven
its success by having an alert box echo the success with a simple true or
false message like so:
<script type="text/javascript">
function performPrePostChecks()
{
if(checkRequiredFormFields('form1','headline','Headline')==false)
{ alert("false");
return false;
}
alert("true");
return true;
}
</script>
How come that irrespective of the function performPrePostChecks returning
true, or false, that the form is still submitted?
Can someone point me in the right direction?
Thanks,
Randell D.
I have the following code for my submit button
<input type="submit" name="action" value="Save Article"
onClick="this.value='Saving...'; performPrePostChecks();">
I have tested performPrePostChecks() - Its a long script, but I have proven
its success by having an alert box echo the success with a simple true or
false message like so:
<script type="text/javascript">
function performPrePostChecks()
{
if(checkRequiredFormFields('form1','headline','Headline')==false)
{ alert("false");
return false;
}
alert("true");
return true;
}
</script>
How come that irrespective of the function performPrePostChecks returning
true, or false, that the form is still submitted?
Can someone point me in the right direction?
Thanks,
Randell D.