View Full Version : Deleting the Toolbar from the current window, Is it really possible?!
ConfusedOfLife
12-23-2002, 08:29 AM
Hi, I'm trying to delete the toolbar of the current window. I'm not trying to delete the toolbar with window.open, instead I wana delete it from the current window.
Let's say the user enters "www.yecc.net" in the explorer address bar, when my page gets opened, I want it not to have the toolbar. It's different with opening a new window with JS, in that case, it's very easy, just simply window.open("yecc.net", "", "toolbar=no");, but I don't want this!
Skyzyx
12-23-2002, 08:49 AM
Not possible... sorry.
zoobie
12-23-2002, 09:48 AM
Kinda...but you'd have to close the back window as 2 are actually opened in this (http://www.terra-it.com/) effect. Enjoy! :D
ConfusedOfLife
12-23-2002, 09:50 PM
Hey zoobie! I got you! what do you do with the first window?! I thought of that somehow but then I also noticed that I can't close the first window by script coz that annoying confirm message goes to the user. But it seems that you just didn't close the first window, what if I don't wana do that?
linuxdude
12-24-2002, 04:04 AM
i don't get what you are talking about in mozilla they both look the same?
zoobie
12-24-2002, 04:58 AM
Well, like whammmy has said, you could just leave the first window open (your goodbye page) underneath the second and when they leave see a nice goodbye...
...or get the parent window onload to close without a prompt leaving the orphan (fullscreen) window:
For example, stick these 2 pages in a folder somewhere to test.
Name this 1.html
<html>
<head>
<script>
function fullwin(){
window.open("2.html","","fullscreen")
}
onLoad = fullwin();
</script>
<script>
function bye() {
self.opener = this;
self.close()
}
</script>
</head>
<body onload="bye()">
</body>
</html>
Name this 2.html
<html>
<head>
</head>
<body bgcolor="black" style="margin:0;padding:0; overflow:hidden;">
<table align="right">
<tr>
<td>
<input type="button" value="X" style="font:bold 15 tahoma; background-color:black;color:red; border:1 ff0000 solid;height:20;width:20;cursor:hand;" onclick="window.close();"></td>
</tr>
</table>
<br><br>
<div align="center">
<span style="font:bold 88 comic sans MS; color:blue">2.html</span>
<br>
</div>
</body>
</html>
Now, when you click on 1.html in your folder, it appears the window has opened fullscreen when in reality, the first has partially loaded popping up the second (2.html) fullscreen and self-closing itself. The only way to open a window fullscreen is from a pop-up. Now, for example, you wanted the parent page to just stay there for a goodbye page after they've left the site, just take the "bye()" script out of the head and body onload. Remember to allow your visitor a way to close the child (2.html) window should they decide to leave. I've added a cool button in this example. In theory, you could have your whole site in fullscreen windows. :cool:
ConfusedOfLife
12-24-2002, 02:15 PM
Thank you zoobie, now it's working! I understood the trick I think, you introduce the current window as its own opener and the poor compiler thinks that this window was opened by another window so it's a child ( orphan) window and then closes it, right?!
Just wondering why it interprets like this!
i don't get what you are talking about in mozilla they both look the same?
dear linuxdude, I think if you try the code that zoobie provided you understand what we're talking about, but for some clarifications purposes! :
try this code in a your script:
<input type="button" onclick="window.open( '', '', ' toolbar=no');">
And you see that the new window that opens doesn't have a toolbar, so, I wanted to have this effect (??) without using a first window ( parent window), but then I found out that it's impossible and I have to have that parent window, now the problem is if you wana close the parent window ( a window that's opened when the user clicked on his/her explorer icon, not the one that we opened via a script) you'll get a confirmation message that the current window is trying to close itself, and I didn't want to have that!
And you can see a workaround for that in zoobie's previous post.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.