I am stumped. Chances are that this will be something simple, but I am unable to obtain the value returned by the RadWindow.Close method in my close event handler. The eventhandler is being fired, but the value (as verified in the VS 2005 debugger) is showing as "{...}" without an expander to see detail (new to javascript debugging, so I am not really sure what that means!).
Here is the code in the popup window...
<script> |
/* This function needed to get reference to RadWindow*/ |
function GetRadWindow() |
{ |
var oWindow = null; |
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog |
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well) |
return oWindow; |
} |
</script> |
//If the user clicks OK then this code is injected into the page via a literal control. |
<script Language=""javascript"">GetRadWindow().close('OK');</script>" |
//If the user clicks Cancel then this code is injected into the page via a literal control. |
<script Language=""javascript"">GetRadWindow().close('Cancel');</script>" |
Here is the window control defintion...
<telerik:RadWindow ID="rwAddNewContact" runat="server" Modal="true" NavigateUrl="~/ProtectedPages/Popups/NewContact.aspx" OpenerElementID="<%# btnAddNewContact.ClientID %>" VisibleStatusbar="false" VisibleTitlebar="true" Title="Add New Contact" OnClientClose="OnNewContactClose" Height="250" Width="730" OffsetElementID="PopupAnchor" ReloadOnShow="true"></telerik:RadWindow> |
Here is the javascript in the parent...
<script type="text/javascript">function OnNewContactClose(radWindow, returnValue) |
{ |
if (returnValue == "OK") |
__doPostBack('_ctl0:cphOne:ctrlContactList:btnHiddenPostbackButton','') |
} |
</script> |
Again, almost everything is working fine - the popup is displaying, posting its data, closing, and firing the event handler on the main form. If I remove the IF test, the main page posts back appropriately.
Does anyone have any suggestions?
Thanks!