This is a migrated thread and some comments may be shown as answers.

javascript error on open

3 Answers 30 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Iron
Andy asked on 09 Jan 2013, 10:41 PM
If I have the following controls.

        <telerik:RadCodeBlock ID="codeBlock" runat="server">
        <script type="text/javascript">
           function OnClientSeriesClicked(sender, args)
           {
              if (args.get_seriesName() != "Months")
               $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(args.get_category());
              
           }
           function openWinNavigateUrl()
           {
              $find("<%=RadWindow_NavigateUrl.ClientID %>").show();
           }
        </script>
    </telerik:RadCodeBlock>
 
<telerik:RadHtmlChart ID="RadHtmlMainBar" Transitions="true"   runat="server"   
        Height="450px" Width="550px" OnClientSeriesClicked="OnClientSeriesClicked">
               </telerik:RadHtmlChart>
 
    <telerik:RadWindow runat="server" ID="RadWindow_NavigateUrl" NavigateUrl="/pagesModules/ComplienceDetail.aspx?Category=19791978"
        Modal="true" InitialBehaviors="Maximize" RestrictionZoneID="NavigateUrlZone">
    </telerik:RadWindow>
 
            <asp:Button ID="Button4" Text="open the window" runat="server" 
            OnClientClick="openWinNavigateUrl(); return false;" />

 

3 Answers, 1 is accepted

Sort by
0
Andy
Top achievements
Rank 1
Iron
answered on 09 Jan 2013, 10:45 PM


Clicking on the chart series does an ajax callback as expected and clicking on the button
opens the radwindow as expected.

However...

If I make this change:

}

function OnClientSeriesClicked(sender, args)
{
$find("<%=RadWindow_NavigateUrl.ClientID %>").show();
}

Then I get the following error when I click the chart series:

Microsoft JScript runtime error: Object doesn't support property or method 'blur'
0
cwk
Top achievements
Rank 2
answered on 10 Jan 2013, 03:05 PM
Hi, I uses the following code.

  function OnClientSeriesClicked(sender, eventArgs) {
         var oWnd = $find("<%= RadWindow_NavigateUrl.ClientID %>");
         //set its NavigateUrl
         oWnd.setUrl("acctpage.aspx");
         //add the name of the function to be executed when RadWindow is closed
         oWnd.add_close(OnClientClose);
         //show the window
         oWnd.show();

     }

Strange thing is that Microsoft JScript runtime error: Object doesn't support property or method 'blur' appears when I am debugging in vs2010. When I deployed to production, no error appear. Any advice appreciated.


Regards
cwk
0
Andy
Top achievements
Rank 1
Iron
answered on 10 Jan 2013, 04:28 PM
When I use RadOpen like in this demo: http://demos.telerik.com/aspnet-ajax/window/examples/radopen/defaultcs.aspx
the error goes away
Tags
Window
Asked by
Andy
Top achievements
Rank 1
Iron
Answers by
Andy
Top achievements
Rank 1
Iron
cwk
Top achievements
Rank 2
Share this question
or