Field Validation

K

ken

I an trying to add the fillowing to my page that will validate some fields.
<SCRIPT>
function validateform()
{
if(document.FrontPage_Form1.Status.value=="Closed" &&
document.FrontPage_Form1.Closeddate.value=="") {
window.alert ("Please Enter a Closed Date!");
return false;
}
if(document.FrontPage_Form1.closeddate.value<>"" &&
document.FrontPage_Form1.Status.value<>"Closed") {
window.alert ("Please change the status to Closed!");
return false;
}
}
</SCRIPT>
I am aslo using the validation that can be set up through the validation
interface in frontpage. The validation done through the interface works
fine but not the inserted code above. Is there a way to use both?

Thanks
Ken
 
T

Thomas A. Rowe

You can not mix custom validation and FP generated validation on the same page by just adding the
custom script to the page.

You have apply the FP validation, then do a view source in your browser, copy the script to notepad,
then modify with your changes, then open the form back in FP and remove all FP Form Field
validation, then add your new modified script.

Note when naming your form and script do not use the name that FP would normally assign for the form
and script.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

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