-
Here's what I want to achieve: A "select bandwidth" page that lets the user select the Flash/Non-Flash version of a site. They select "Flash", and it opens a new browser window with no nav bars or scroll bars, etc etc, and continues on with the rest of the site.
That part is easy. The problem: How do I get rid of the parent window that has all the nav bars on it?
I know I can't close it without the warning screen coming up. But is there a way to minimize it?
What I'm finding is that if someone can still see a "back" button on the screen, their natural impulse is to click on it, even if it doesn't necessarily control the window they're working on. If they want to go back and it's the only "Back" button they can see, they're clicking like there's no tomorrow. But clicking "Back" on the "bandwdith select" page takes them back to wherever they were before they got to my site.
Help? Anyone? Bueller?
Thanks
Neil
-
Explorer won't let you close a window without the warning.
What you can do is make it fit behind with the
window.moveTo(a,b) and window.resizeTo(x,y) functions so that it is hidden behind the front window. I know this is a bit corny but it works fine.
~mgb
-
Okay, that sound you hear is my credibility swooshing out the window with the following question:
How exactly would I need to enter that code to make it work? Is it Actionscript, or Java?
(I'm primarily using Flash and Dreamweaver MX...)
Thanks a ton,
Neil
-
Put this in the head section of the html page that pops up-
<script language="javascript">
function hidePage()
{
opener.moveTo(100,100);
opener.resizeTo(100,100);
}
</script>
</head>
<body onload="hidePage()">
~mgb
[Edited by mgb on 08-03-2002 at 07:19 PM]
-
But what if the page that opens isn't an HTML page?
I was hoping that the "Bandwidth Selection" page would be the only one with nav bars and such on it - everything after that (at least on the high-end site) is contained in a series of Flash movies.
The only way I knew of to open a new browser window with no nav bars and scroll handles, etc was to use the "OpenBrowserWindow" command out of Dreamweaver - am I missing something?
Thanks for your time,
Neil
-
Never mind, just figured it out.
I opened the popup window using OpenBrowserWindow, but instead of calling for a .swf file, it calls for an .htm window that's exactly the same size as the .swf it contains.
That gave me a place to stick the script, and it works like a charm.
Thanks a TON for all your help - that's been a frustration of mine for DAYS now.
--N
-
Hi,
I think it actually is possible to close the top-level parent window...
I just got the 'Google' toolbar and once it loaded in a new new browser window, the main window shut down. Not sure if it was to do with a self-created registry permission change coz it happened in a flash.
-
Yes, I think there's a workaround, but Microsofts idea is that the user should have control of the main window - which strikes me a very fair.
I don't know what the workaround is though.
~mgb
-
I know. I guess it IS fair to give the user control of the main window, but that leaves my only choices as either cluttering up their desktop with more popup windows, or resizing and moving the "opener" window, which then resets my choice of size to be the new default size every time they open their browser, until they resize it again.
If someone wanted to be mean to a new user, they could resize the window to 1x1, and someone like my mother wouldn't have a clue what to do with it. I feel guilty having it at 300x300. But it's the only way I know of to get the "attractive presentation" I'm after.
--N
-
You can resize the opener by putting in the body tag-
<body onfocus="resizeWin()">
where resizeWin() is a function which does the reverse of the one that hides it.
~mgb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|