Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with window.open

Status
Not open for further replies.

shweta

Technical User
Mar 20, 2001
27
US
Hello!

I am having a very wierd problem with window.open all of a sudden.

Consider this code snippet below to simulate my problem.

Dim oNewWin

Set oNewWin=window.open("test12.htm")
msgbox(oNewWin.screenTop)

The window is opened fine but then the msgbox statement spits out a script error "Object required: oNewWin".

This is happening to me in every single page which opens a new window from script. Basically, there is a script error if I try to access the new window using the name.

I am using Windows 2000 and an IE 5 browser. (The same problem is not happening on any other mchine with the same configuration, just my machine)

Any help/suggestions??

Thanks,
shweta
 
works fine here... WinNT 4.0, IE 5.5

btw, this is the js forum, not vbs ;-) =========================================================
if (!succeed) try();
-jeff
 
Right! Sorry about that... here's the JS code for the same.

function winclose(str){
var oNewWin;
oNewWin=window.open("test12.htm", "myname");
alert(oNewWin.name);
oNewWin.focus()
}

And as for working on the NT and IE 5.5, as I mentioned before it works on every machine other than mine. Even a machine with the same config as mine

Another point to note is that this script works on Netscape with no errors.

Thanks!
 
probably a bad browser install on that machine.
=========================================================
if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top