View Full Version : Popups
agent002
04-22-2003, 11:26 AM
Hi!
I'm wondering if a normal browser window may change itself's attributes, like remove its menubar, toolbar, status and so, using JavaScript?
I have an example... Look at the Live Picture link in my signature!
Thanks in advance!
agent002
04-22-2003, 11:30 AM
Oh and when it comes to the webcam link in the signature, it opens a new window, which opens the real webcam popup, which again has no menubars, toolbars, statuses etc.
The problem would be solved if the popup opening window could close itself, but it can't, not without confirming the user first.
Jon Hanlon
04-22-2003, 07:19 PM
A window cannot alter its own attributes.
A window can create a new window with certain attributes, but these cannot be changed once a window is born.
A window can close itself, as long as it was created through script.
So you could probably get it to work with:
<a href="#" onclick="window.open('http://members.surfeu.fi/jerkku/heasopen.html','cam','height=400,width=400,toolbar=no,menubar=no,titlebar=no,status=no');return false">FinCam</a>
Then in heasopen.html:
<body onload="setTimeout('self.close()',2000)">
agent002
04-24-2003, 11:53 AM
As I said, I was thinking about that, but I suppose the browser always wants to confirm the user before closing itself?
agent002
04-24-2003, 12:11 PM
I tried to make it close itself and it really didn't confirm me. Why does it want a confirm sometimes, and sometimes not?
Jon Hanlon
04-25-2003, 07:47 PM
You can close any window that was created through script (window.open()), but not any window that was created via a link (a href="..." target="..."), or a bookmark.
A window can close any window it creates (through script), and it can close itself if it was created through script.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.