rajmohans
asked on
Close the previous window
I've got a splash page from where I'm launching another window with window.open. At the same time I want to minimize the splash window, and if I use
this.window.resizeTo(1,1) it's working fine with IE 4.0, not with netscape.
Can you clarify?
Thanks
Raj.
this.window.resizeTo(1,1) it's working fine with IE 4.0, not with netscape.
Can you clarify?
Thanks
Raj.
ASKER
Even if I remove this it's not working in Netscape.
If I try to close it using window.close(), it's displaying a dialog, to confirm the closing of window I'm viewing and if I click Yes it's closed and it's going on hanging with Netscape.
If I try to close it using window.close(), it's displaying a dialog, to confirm the closing of window I'm viewing and if I click Yes it's closed and it's going on hanging with Netscape.
ASKER
Even if I remove this it's not working in Netscape.
If I try to close it using window.close(), it's displaying a dialog, to confirm the closing of window I'm viewing and if I click Yes it's closed and it's going on hanging with Netscape.
If I try to close it using window.close(), it's displaying a dialog, to confirm the closing of window I'm viewing and if I click Yes it's closed and it's going on hanging with Netscape.
ASKER
Even if I remove this it's not working in Netscape.
If I try to close it using window.close(), it's displaying a dialog, to confirm the closing of window I'm viewing and if I click Yes it's closed and it's going on hanging with Netscape.
If I try to close it using window.close(), it's displaying a dialog, to confirm the closing of window I'm viewing and if I click Yes it's closed and it's going on hanging with Netscape.
I have no idea. moveTo() using negative values or values beyond the screen's size won't work either.
Martin
Martin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Rafistern
Did you see the dialog to confirm the closing of window, in IE, before closing the window? And is it working in Netscape?
Is there any way of minimizing the window instead of closing?
Raj
Did you see the dialog to confirm the closing of window, in IE, before closing the window? And is it working in Netscape?
Is there any way of minimizing the window instead of closing?
Raj
I didn't get any problems in IE or in NS. I do not think that there is a way to minimize the window. I saw that in IE you had managed by sizing it to 1,1 but that does not appear to work for NS and there is no "official" function to do this.
The dialog should appear if you try and close one window from a script running in another but here the closing is done in the same window that is being closed.
ASKER
Rafistern & Martin,
I tried resizing the main window using window.resizeTo(1,1) and found it working in both the browsers.
Can you tell me how to substitute the values for variables rleft and rtop, in window.open
function makeRemote(URLString)
{
var part = URLString;
wtop=window.top;
wleft=window.left;
rtop=wtop;
if (wleft>600)
{
rleft=wleft-200
}
else
{
rleft=wleft+550
}
remote=window.open("","rem ote","alwa ysRaised=Y es,width=2 00,height= 425,left=" +rleft+",t op="+rtop+ ",scrollba rs=no");
remote.location.href=(URLS tring);
if (remote.opener==null) remote.opener=window;
remote.opener.name="opener ";
}
I'm trying to launch the remote, based on the position of the main window, but it is launching at top left.
Raj.
I tried resizing the main window using window.resizeTo(1,1) and found it working in both the browsers.
Can you tell me how to substitute the values for variables rleft and rtop, in window.open
function makeRemote(URLString)
{
var part = URLString;
wtop=window.top;
wleft=window.left;
rtop=wtop;
if (wleft>600)
{
rleft=wleft-200
}
else
{
rleft=wleft+550
}
remote=window.open("","rem
remote.location.href=(URLS
if (remote.opener==null) remote.opener=window;
remote.opener.name="opener
}
I'm trying to launch the remote, based on the position of the main window, but it is launching at top left.
Raj.
I would use moveTo to position the window as this is more widely supported.
ASKER
I prefer resizeTo or close rather than moveTo though it works fine.
Can't you close it using close()?
Martin