I have implemented a confirm close window for closing a RadWindow which works fine, however I want to only show the dialog if the user clicks Cancel. I have the following code:
Calling Window:
Closing window:
I am getting the error Object doesn't support this property or method.
I can confirm that the text (btndesc) is "Cancel" when the function is fired, but the argument is not being received on the calling window. Any help is appreciated.
Calling Window:
| function OnClientShow(sender, arg) { |
| sender.add_beforeClose(onBeforeClose); |
| } |
| function onBeforeClose(sender, arg) { |
| var oArg = arg.get_argument(); |
| alert(oArg.closingbutton); |
| if (oArg.closingbutton = "Cancel") { |
| function callbackFunction(arg) { |
| if (arg) { |
| sender.remove_beforeClose(onBeforeClose); |
| sender.close(); |
| } |
| } |
| arg.set_cancel(true); |
| radconfirm("Any unsaved data will be lost.<br /><br />Are you sure you wish to close this window?", callbackFunction, 400, 200, null, "Close this window?"); |
| } |
| } |
Closing window:
| //Close the dialog |
| function closeWindow(btndesc) { |
| var oWnd = GetRadWindow(); |
| var oArg = new Object(); |
| oArg.closingbutton = btndesc; |
| oWnd.close(oArg); |
| } |
I am getting the error Object doesn't support this property or method.
I can confirm that the text (btndesc) is "Cancel" when the function is fired, but the argument is not being received on the calling window. Any help is appreciated.
