How to do a form Submit based on multiple conditions in FrontPage

R

Rick Nietubicz

If at least one of two quantity fields is greater than 0, I want to SUBMIT
else I want to post the error as though it was detected by the FrontPage Form
Field edit rules.
How do I do this?
 
M

MD Websunlimited

Hi Rick,

You'll need to create a script that does the testing then runs the FP supplied verification scripts.

<input type="submit" onclick="if (parseInt(this.form.q1.value) > 0 || parseInt(this.form.q2.value) > 0 ) { return
FrontPage_Form1_Validator(this.form); } else { alert('One or both q1 and q2 must be greater than 0'); this.form.q1.focus(); return
false; }" ><input type="reset" value="Reset" name="B2"></p>


Where q1 and q2 are the quantity fields. FrontPage_Form1_Validator is the name of the FP validation routine; this should be static
provided there are no other forms on the page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top