Forum Moderators: open

Message Too Old, No Replies

problem with window.open

javascript redirects

         

bigBrother

2:25 pm on Oct 29, 2004 (gmt 0)

10+ Year Member



I am following one of your recommendations to redirect a page without having the annoying alert.
Here's my code:

function win() {
window.open("../MyDirectory/MyFile.asp","","height=800,width=1024,left=0,top=0,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes");
}

function winClose() {
self.close()
}

This is called with an OnClick and and closes with an OnBLur.

My problem is that the new window I want to open needs to have the location bar available.
If I remove the location parameter, I do not get that annoying alert box. But, if I do include it, then the page is redirected with the annoying alert box.

How can I get around this?

Thanks for all your help,
bB

RonPK

2:54 pm on Oct 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your want the new window to be that large, and have all the normal window assets, why not simply open it with target="_blank"?

janevok

2:58 pm on Oct 29, 2004 (gmt 0)

10+ Year Member



if your redirecting the user to a new window and then closing the original window, can you not do a simple
document.location='myfile.asp' on a onClick?

bigBrother

3:06 pm on Oct 29, 2004 (gmt 0)

10+ Year Member



Hi RonPK
The reason I'm not wanting to use <"_blank">, is quite simply because I don't want yet another browser instance, but rather to have this pop-up resize itself to the set dimensions with all the parameters back in place. The pop-up initially had none of those parameters, and was much smaller.

Janevok,
By doing a "document.location='myfile.asp' on a onClick" -- wouldn't that leave the underlying pop-up open?

Thanks all for your quick repsonses,