Click to See Complete Forum and Search --> : How Do I get a page to close
TammyB
08-06-2003, 08:03 AM
I needed a page to open full screen and I could not for the life of me figure out how to make that happen when the page loaded. So..I launched the page from somewhere else. This is the code I have in my "launcher page":
<script language="JavaScript">
function launchwin()
{
newwin = window.open("mypage.html","aces","fullscreen=1, scrollbars=1")
newwin.resizeBy(15,0)
}
</script>
Problem is, I need the launcher page to close when the full screen page opens. Any help would be greatly appreciated.
AdamBrill
08-06-2003, 08:14 AM
After you launch the other page, use window.close() to close the existing window....
TammyB
08-06-2003, 08:31 AM
Where or which page do I put the window.close() in? And, will I get the popup that says "...the window is trying to close...".
AdamBrill
08-06-2003, 08:41 AM
You put the window.close() in whatever window that you want to close...
There is a hack to not get the "Are you sure you want to close window?" prompt. It's pretty simple, so let's see if I can type it up from memory... ;)window.opener=self;
window.close();I think that's all there is to it. :D Let me know if that doesn't work... ;)
TammyB
08-06-2003, 09:10 AM
Hey Adam,
My html doc is actually a Flash file published in HTML so I did it this way:
getURL("javascript:open('mypage.html','mypage','fullscreen=1,location=0,
menubar=0,scrollbars=0,status=0,toolbar=0')")
New Problem - I get this page that says [object]
kdcgrohl
08-06-2003, 01:32 PM
try this...
getURL("javascript:open('mypage.html','mypage','fullscreen=1,location=0,menubar=0,scrollbars=0,status=0,tool bar=0');window.close();")
AdamBrill
08-06-2003, 08:59 PM
Or, if you don't want the prompt asking to close, try this:
getURL("javascript:open('mypage. html','mypage','fullscreen=1,location=0,menubar=0,scrollbars=0,status=0,toolbar=0');window.opener=se lf;window.close();")
TammyB
08-07-2003, 05:24 AM
Thanks Adam, that did it!
AdamBrill
08-07-2003, 07:27 AM
No problem. I'm glad I could help. :)