adding additional javascript validation to the FP2003 validation

  • Thread starter Thread starter JDP
  • Start date Start date
J

JDP

If I add additional js validation to a button on a form as in

<input type="button" onClick="checkOTCT();"

which returns either false or submits the form...using
document.forms[0].submit

how do I interface with any existing FP2003 form validation of
individual text fields for example:

action="timecards_confirm.asp" onsubmit="return
FrontPage_Form1_Validator(this)"

It seems to me that my js validation is bypassing the FP validation
and submitting a form with errors..
 
Hi JDP,

If you wish to augment the FP 3/2/0 field validation you'll need to save
the page then edit it external to FP removing the validation webbots then
changing the code. It is then yours to maintain.

Another method is to use a separate validation that is ran using the onclick
event handler of the submit button. If that validation good, then call the
intrinsic FP validation and return its results.

onclick="if ( myValidation() ) { return
FrontPage_Form1_Validator(theForm); } else { return false; }"
 
Yes, it seems you need to perform your validation
entirely in FrontPage, or entirely with custom code.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Back
Top