[thelist] window.resize / window.open (JavaScript)

jcanfield at magisnetworks.com jcanfield at magisnetworks.com
Wed Jul 3 12:38:07 CDT 2002


> I have a login page that I want to open in a smaller browser
> window and I want that window to be chromeless. This is not
> triggered by clicking a link, but when someone types in a web address.
[ . . . ]
> Anyone know how to:
> 	1. Open a new browser window (not a clicked link)
> 	2. Resize it to 500x300
> 	3. Move it to 100, 100
> 	4. Make it chromeless

JavaScript.

[ . . . ]
> <body onLoad="opener()" onBlur="window.close()">
>
> This works, but the onBlur function causes IE to display a
> dialog box to verify if I want the window to close. Is there
> a way to close the launcher window without the user having to
> click "YES" in the dialog box?

No, the page you're closing is the parent, yes? Windows not opened with
JavaScript cannot be closed with JavaScript without this warning. It's part
of the browser security and can only be overridden with advanced security
setup and stuff that I've never used and don't fully understand. If you
really need to go there, Danny Goodman's "JavaScript Bible" could help, but
I'd guess there's a better way.

Just curious, in case there's another solution, what's the purpose of the
small chromeless window with no parent?

spinhead



More information about the thelist mailing list