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

Javascript runtime error when loading radalert/radconfirm

1 Answer 270 Views
Window
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 06 Aug 2010, 03:00 PM
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!

1 Answer, 1 is accepted

Sort by
0
Brad
Top achievements
Rank 1
answered on 06 Aug 2010, 05:19 PM
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.
Tags
Window
Asked by
Brad
Top achievements
Rank 1
Answers by
Brad
Top achievements
Rank 1
Share this question
or