I'm using the example from
http://demos.telerik.com/aspnet/prometheus/Window/Examples/CommunicationBetweenRadWindows/DefaultCS.aspx
to load a radwindow, specifically the following code:
If the user opens the radwindow more than once, the OnClientClose is fired for each time it has been opened.
What do I need to do to fix this? Can I destroy the radwindow once it's initially closed so that when it's opened it doesn't get mulitple close events added.
I suppose I can work around by having a flag to make sure the oWnd.add_close doesn't do anything after the first time, but I'm just wondering if this is intended behavior. I have no way of determining if it fires multiple times in the demo.
Thanks.
Update: I tried the hidden flag trick, but that doesn't work as the window does lose it's OnClientClose atttribute on postback.
http://demos.telerik.com/aspnet/prometheus/Window/Examples/CommunicationBetweenRadWindows/DefaultCS.aspx
to load a radwindow, specifically the following code:
| function openWin() |
| { |
| var oWnd = radopen("SegmentTable.aspx?st=1", "RadWindow1"); |
| oWnd.setSize(340,340); |
| //set a function to be called when RadWindow is closed |
| oWnd.add_close(OnClientClose); |
| } |
| function OnClientClose(oWnd) |
| { |
| alert('wtf'); |
| } |
If the user opens the radwindow more than once, the OnClientClose is fired for each time it has been opened.
What do I need to do to fix this? Can I destroy the radwindow once it's initially closed so that when it's opened it doesn't get mulitple close events added.
I suppose I can work around by having a flag to make sure the oWnd.add_close doesn't do anything after the first time, but I'm just wondering if this is intended behavior. I have no way of determining if it fires multiple times in the demo.
Thanks.
Update: I tried the hidden flag trick, but that doesn't work as the window does lose it's OnClientClose atttribute on postback.