I have the JavaScript the way you described.  What I'm not having success with is
how to handle, in my NetDynamics CancelButton_onWebEvent, the situation when
the user presses "No/Cancel" in the JavaScript dialog.  

If the user presses "Yes", I continue with the code in the web event to cancel the
order.  If the user presses "No/Cancel", I just want the JavaScript dialog box to
go away and have the current page await the users next interaction.  

If the response from the user is "No/Cancel", I've tried return(SKIP), 
return(PROCEED), 
return(STOP).  All of these return a blank HTML page.  What should I do, in the
CancelButton_onWebEvent, when the user presses "No/Cancel" in the JavaScript
dialog?

Thanks,

Alan Turner
Frito-Lay, Inc.

[EMAIL PROTECTED] wrote:
>>why not just "return false;" in the if the user clicked 
>"No/Cancel" in the javascript dialog?
>
><SCRIPT LANGUAGE="JavaScript">
>function confirmCancel()
>{
>   if (confirm("You are about to cancel this order?"))
>   {
>      return true;
>   }
>   else
>   {
>      return false;
>   }
>}
></SCRIPT>
>
>in the ExtraHTMLText property for the Cancel button put:
>onClick="return confirmCancel()"
>
>No round-trip necessary to redisplay the page...
>
>-Chip
>
>[EMAIL PROTECTED] wrote:
>>When a user selects the CANCEL ORDER button, I present a JavaScript
>>confirmation window to capture the confirmation from the user.  This is done
>>in the Web Event for the CANCEL ORDER button.  If the user cancels the 
>>request, I want simply show the page as it was when the CANCEL ORDER
>>button was pressed.
>>
>>When I try the following:
>>
>>if (getDisplayFieldValue("hdJSConfirmBox").stringValue().equals("No"))
>>{
>>      return load("pgDisplayOrder");
>>}
>>
>>the web browser just keeps processing and never returns the page.  If I load a 
>different ND page,
>>it comes back quickly.  Is there something else I need to do to re-display the exact 
>same page?
>>
>>Also, in lieu of loading the page, I've tried return(SKIP), return(PROCEED), and 
>return(STOP) and 
>>all of these return a blank HTML page.
>>
>>Thanks,
>>
>>Alan Turner
>>Frito-Lay, Inc.
>

_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to