View Full Version : Confirm box prevent post

05-25-2005, 07:13 PM
I have a form that if the user tries to submit without assigning testers, I want it to bring up a confirm box reminding them that there are no testers assigned.

If they click ok, I want it to post the form. If they click cancel, I want it to prevent the posting of the form and give them the opportunity to attach testers.

How do I do this?

Thank you for any help with this.

<SCRIPT LANGUAGE=\"JavaScript\" type=\"text/javascript\">

function TheFormCheck()

comfirm(\"Reminder! There are no testers assigned\");

<form name=\"addtask\" method=\"post\" action=\"../admin/tasksubmit.php\" onSubmit=\"return TheFormCheck()\";>

05-25-2005, 07:30 PM
you need to return the results of the confirm box.

<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
function TheFormCheck() {
return comfirm("Reminder! There are no testers assigned");

05-25-2005, 08:05 PM
Thank you eak, that worked!