i have the following js code:
<SCRIPT>
<!--
function go_there()
{
var where_to= confirm("Do you really want to go to this page??");
if (where_to== true)
{
window.location="http://yourplace.com/yourpage.htm";
}
else
{
window.location="http://www.google.com";
}
}
//-->
</SCRIPT>
and the following code:
<html:form action="/addCust.do" method="post">
<P><html:submit property="custName" value="Submit" onClick="go_there();" />
The dialog box works OK but the form:action overrides it (i.e. it should redirect to http://www.google.com if i click no. But this doesn't seem to be the case. Is there a possible way to get both the js dialog box to work and submit it to the addCust.do page if the user selects yes?