File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes opening page without toolbar, address bar etc.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "opening page without toolbar, address bar etc.." Watch "opening page without toolbar, address bar etc.." New topic
Author

opening page without toolbar, address bar etc..

Ilja Smoli
Ranch Hand

Joined: Dec 02, 2001
Posts: 64
Hi there,
I'd like that my page opened in browser automatically opens without any bars...
i tryed to do this just with window.open function with parameters, it works but i can't close the previous window without alert...
does my problem has a solution?
thx in advance
sunitha reghu
Ranch Hand

Joined: Dec 12, 2002
Posts: 937
u have to write something like this
var wh = "";
function newWindow(){
wh=window.open('/mypage',winname,'toolbar=no,status=no,scrollbars=yes,location=no,menubar=no,directories=no, width=' + (screen.width * .99) + ',height=' + (screen.height * 0.95) + ',ScreenX=0,ScreenY=0, resizable=yes');
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not close the orginal window with out an alert do to a security issue. When you close it, you are loosing all of the persons history info of that window. JUST let it be.
For mre options with a window look at this:
http://www10.brinkster.com/A1ien51/scripts/PopUpWinGenV3.htm
Eric
Ilja Smoli
Ranch Hand

Joined: Dec 02, 2001
Posts: 64
ok, i know that it's impossible to close window without alert, so I asked is it possible to make first window without toolbars etc.. i'll try to explain what I want(2 variants):
1. When the user opens a page, it opens right with parameters like in window.open (width,height,toolbars etc..) OR 2. On first page i have login form, and after logging in, page opens with parameters...
as i understand second variant is not very suitable for me because login page is still open and i can't close it without alert.
so im looking for a solution for a first variant..
any ideas?
thx in advance
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not remove tool bars from the main window
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Bottom line is, you can't do it the way you want. Best you can do is to open your page in a new window decorated as you wish and leave the original browser window be (perhaps redirecting somewhere else if appropriate).
And when you stop to think about it, would not your way be mighty unfriendly? Someone browses along, hits your site, clicks a link, and you close the browser window on them. Now if they want to continue surfing, they have to open a new browser instance.
It'd certainly tick me off a bit.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ilja Smoli
Ranch Hand

Joined: Dec 02, 2001
Posts: 64
Bear Bibeault , I know about etiquette of browsing sites, this case won't be unfriendly, because this page is not public, and access for it have limited range of people. Im developing web application using java and jsp, for one private company, aim of this application is a virtual warehouse with facilities to invoice and making other docs. my idea just to prevent users, (i think u understand that most of them r lame) from clicking back and forward buttons, thats all
Originally posted by Bear Bibeault:

And when you stop to think about it, would not your way be mighty unfriendly? Someone browses along, hits your site, clicks a link, and you close the browser window on them. Now if they want to continue surfing, they have to open a new browser instance.
It'd certainly tick me off a bit.
hth,
bear
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What browser are they using?
If they are using IE, then I can help you out.
Email me if it is IE.
Eric
Pramoda Bhat
Ranch Hand

Joined: Oct 17, 2003
Posts: 32
Hi Eric,
I was just going through this post.., which is like a tailormade for my problem!! Even I'm in a same position & my clients ARE using IE.. Can U please help??
Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
See if this works for ya
window.open(blah);
window.opener = self;
window.close();
 
 
subject: opening page without toolbar, address bar etc..