Javascript runtime error when loading radalert/radconfirm

2 posts, 0 answers
  1. Brad
    Brad avatar
    29 posts
    Member since:
    Jul 2010

    Posted 06 Aug 2010 Link to this post

    Hi all,

    I am using the below code to try to display a radalert or confirm server-side and am getting this error:
    1.)Microsoft JScript runtime error: '_visibilityMode' is null or not an object
    2.) Microsoft JScript runtime error: Object doesn't support this property or method

    Code:

    ScriptManager

     

    .RegisterStartupScript(this, this.GetType(), "WindowOpen", "radalert('Test', null, null, 'Test')", true);

     

     

     
    I get the same problem if the code is in a Javascript function and that function is called.
    ie.

     

    function

     

    openNewWindow()

     

    {

     

    var windowURL = "www.yahoo.com";

     

     

    var oWnd = radopen("http://" + windowURL, null);

     

    oWnd.center();

     

    //var websiteName = getWebsiteName(oWnd.get_navigateUrl());

     

     

     

     

     

    //Add new tab to the tabstrip

     

     

     

     

    tabStrip.trackChanges();

     

    var tab = new Telerik.Web.UI.RadTab();

     

    tab.set_text(

    "Test");

     

    tabStrip.get_tabs().add(tab);

    tab.set_imageUrl(oWnd.get_navigateUrl() +

    "/favicon.ico");

     

    tabStrip.commitChanges();

     

    //Select this tab

     

     

     

     

    tab.select();

    }

     

    the code is breaking on: var oWnd = radopen("http://" + windowURL, null);

    Any ideas?

    Thanks!

  2. Brad
    Brad avatar
    29 posts
    Member since:
    Jul 2010

    Posted 06 Aug 2010 Link to this post

    Figured it out.

    I had the window manager on one of my User Controls that were sub a main page. Putting the Telerik script manager on the master page, and the window manager on the parent page of the user controls resolved the issue.
Back to Top