...

View Full Version : Confirm box prevent post



tripwater
05-25-2005, 06: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()\";>

eak
05-25-2005, 06: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");
}
</script>

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum