Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser without bars

Status
Not open for further replies.

gcastillo

Programmer
Jun 9, 2000
127
MX
I need to open a browser with no scrolling bars, nav bar etc. I know it can be done from other page with window.open('URL','Name','parameters'), BUT i need that the page that is opening make itself with the parameters I want...
I mean, I'm opening client.htm, and client.htm must open itself with no navigation bar or tool bar... Please help!! I'm stuk here!
 
Do you mean you are opening it from a link from another page, purely a link I mean, so it is actually not a new window? This is an interesting thing to want to do.

It dosen't look like anything can be changed after the page has been drawn, I have tried it with a pop-up window, so I guess it's the same with ordinary ones.

Sorry, I can't help.
 
I am opening client.html from a script in another page, say beforeclient.html. I need to close beforeclient.html at the same time that I open client.html, and client.html must have no navigation bar, no tools bar, etc.
window.open(etc) works fine, BUT it leaves beforeclient.html open. Trying to close beforeclient.html wind self.close() or window.close() always ask for confirmation. I can not let that confirmation happens. I REALLY need to close beforeclient.html.
I hope it's not complicated...... Thanks for an idea!!
 
Because you are using a window which was not created with javascript (i.e the one holding beforeclient.html), you will always get asked for confirmation before closing, so the easiest way to avoid this would be if you could make beforeclient.html be opened in a new window.
In Javascript 1.2 you can close windows unconditionally, only if you have the UniversalBrowserwrite privilege,
which I have not investigated but sounds convoluted!
I don't know if this is possible in the site you are creating, and I realise you probably don't want to do this.

The thing is, by the sounds of it, if you are closing the original window, then you are cutting yourself off from the rest of your site though, so to get back in you will need to open additional windows.

But it comes down to the fact that you can only close windows created with javascript,without confirmation.

Personally (without the benefit of all the factors) I would just open beforeclient.html in a new window, as a stepping stone, because you are moving into a completely new window anyway when you go to client.html. This way the close methid works sweetly, no probs.

Let me know if this is un-feasible!

Ben
 
Well, here are some things you can do:
Code:
if (document.layers)
{
	self.menubar.visible=0;
	self.toolbar.visible=0;
	self.locationbar.visible=0;
	self.personalbar.visible=0;
	self.scrollbars.visible=0;
	self.statusbar.visible=0;
	self.resizeTo(500,500);
	self.setResizable(0);
}
else if (document.all)
{
	self.resizeTo(500,500);
}
Apparently Netscape gives you more access to that than IE does. This is for security reasons. People don't want web pages locking them out of their browser. If you've ever been to a warez, casino, or porn site you know what I'm talking about. They can take over your browser and keep opening windows and hiding controls and stuff. You don't want them to do that with the initial window you came in on.

You could try doing something like
Code:
window.opener.document.write(&quot;<html><body onblur='window.close()'></body></html>&quot;);
window.opener.document.blur();
but I doubt you could get it would work.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top