Click to See Complete Forum and Search --> : Playing with Window


jkruer01
02-11-2003, 11:55 AM
I need to open a page and have no scrollbar, status, menu, location, etc.

The only thing I can think of is to create a page that uses window.open to open a new window without all the stuff I don't want and then to close the page that called it.

I got this working but when I use window.close(); it asks the user if they want to allow the page to close. Does anyone know how to get around this?

Or, if you can make the current page hide all of the scrollbars, menus, location, etc. that would work also.

Here is the code I am using now.

<script>
stw = window.open("", "JavaConnect", 'width=315,height=460,directories=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,titlebar= 1,toolbar=0');

stw.navigate("MyURL");
if (stw.opener == null)
stw.opener = window;

window.close();
</script>

gil davis
02-11-2003, 12:00 PM
It's a security thing. You cannot close a window using javascript that you did not open using javascript without the user's permission.

jkruer01
02-11-2003, 12:06 PM
Then do you know how to open a page without showing the scrollbars, navigation, etc?

This is not on the web it is on a local computer. Just one single HTML file but I need it to open without the scrollbars, menus, etc.

Thanks.

Jona
02-11-2003, 12:08 PM
stw = window.open("","name","config")
stw.document.write("<BODY style='overflow:hidden'>")
// the above line takes out the scrollbars

You can also do a chromeless window...

jkruer01
02-11-2003, 12:13 PM
If I do that though I still end up with 2 windows in the end. However I do it, I need to open a window with out any extras and in the end only have 1 window that is open.

What is a chromeless window?

Thanks,
Jeremy

Jona
02-11-2003, 12:34 PM
Here, Joe Burns's HTMLGoodies Allexamples .zip file. This should clear up a lot for you...

Jona
02-11-2003, 12:35 PM
Try HTMLgoodies.com

jkruer01
02-11-2003, 01:01 PM
Thanks for the tip but if I read it correctly, the chromeless window still has to open in a new page which still leaves me with two windows open in the end.

Thanks,
Jeremy

Please correct me if I am wrong.