PDA

View Full Version : closing window ???


MIG - Hungary
07-26-2003, 02:12 AM
Hi!

I want to make a window which closes itself after a few seconds...

i tried a few tricks which i thought will work but i can make it work

Can U help me ???

please email me if u can : mig@freemail.hu

and another problem: how can i make a link to open a window in full size ???

thx a lot

--
MIG

World-Craft
07-26-2003, 02:42 AM
I beleive you can only close a javascript created window. (window.close())

If you could possibly explain your current situation a bit more, maybe I or one of the other members can help you.

Maybe have an 'intro' page, with an 'enter' button, that creates the window with javascript. Just a thought ;)


You can't make it maximized, but, the new page can have this code:


top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}

The code will make the window be the same size as full screen.

hope this helps

cheers, mat!

Harry
07-28-2003, 09:52 PM
Here is some code I use to open a new window in full screen mode(The same like you get when you press the F11 key) This is my index.php file which I never reference again in my application so I just close it after my first page is opened.

<head>
<script language="javascript">
function openSite(){
var mainwin = window.open("ps_page_1.php","mainwin","fullscreen");
window.opener='BrazilR0x';
window.close();
}
</script>
</head>

<body onload="openSite()">


The other two lines give the window that you opened with IE a name which will then allow you to close it without that annoying confirmation box. I have only tested this on IE6 so I don't know if it will work on NS.

This might help you. I think all you would need is to put a timeout in the function for whatever to wanted it to be at the beginning of the function.

I'm a n00bie at this but I hope this will help you.