Need some help...
Here's the js to open my rad window (working great)
Here's my code that SHOULD be firing when the window closes:
So, window opens great, when I close it, it should fire the "refreshCustomFields" JavaScript method which in turn will trigger an AjaxRequest on my RadAjaxPanel. However, I get the following error in Firefox:
And this error in IE 8 (Windows 7)
The client script "refreshCustomFields" is in the source and the add_close(onClose) gets called and set properly when the window opens (JavaScript debugger). But I get errors when I close the window. Any help would be appreciated.
Here's the js to open my rad window (working great)
function GetRadWindow(){ |
var oWindow = null; |
if (window.radWindow) oWindow = window.radWindow; |
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; |
return oWindow; |
} |
function OpenRadWindow(url, modal, width, height, name, cancelReturnValue, title, refresh, refreshElement, onClose) { |
var oManager = GetRadWindowManager(); |
if (oManager == null) { |
alert("No Rad manager is available"); |
return; |
} |
Wnd = oManager.open(url, name); |
Wnd.setSize(width, height); |
Wnd.set_title(title); |
Wnd.setActive(true); |
Wnd.SetModal(true); |
Wnd.set_showContentDuringLoad(true); |
Wnd.center(); |
Wnd.refresh = refresh; |
Wnd.cancelReturnValue = cancelReturnValue; |
Wnd.returnValue = cancelReturnValue; |
if (onClose!=null) Wnd.add_close(onClose); |
if (refreshElement==null) refreshElement = "custom"; |
Wnd.refreshElement = refreshElement; |
} |
Here's my code that SHOULD be firing when the window closes:
<telerik:RadCodeBlock ID="cb1" runat="server"> |
<script type="text/javascript"> |
function refreshCustomFields(sender,eventArgs) |
{ |
var ajaxManager = $find("<%= rapCustom.ClientID%>"); |
ajaxManager.ajaxRequest(eventArgs); |
} |
</script> |
</telerik:RadCodeBlock> |
So, window opens great, when I close it, it should fire the "refreshCustomFields" JavaScript method which in turn will trigger an AjaxRequest on my RadAjaxPanel. However, I get the following error in Firefox:
Error: a[b] is not a function |
Source File: http://localhost:64113/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad0c4ca6e-6b5d-49b6-922d-5244924fb100%3aea597d4b%3ab25378d2 |
Line: 6 |
And this error in IE 8 (Windows 7)
Webpage error details |
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3) |
Timestamp: Wed, 28 Oct 2009 21:14:42 UTC |
Message: Function expected |
Line: 6 |
Char: 29366 |
Code: 0 |
URI: http://localhost:64113/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad0c4ca6e-6b5d-49b6-922d-5244924fb100%3aea597d4b%3ab25378d2 |
The client script "refreshCustomFields" is in the source and the add_close(onClose) gets called and set properly when the window opens (JavaScript debugger). But I get errors when I close the window. Any help would be appreciated.