Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

opening page without toolbar, address bar etc..

 
Ilja Smoli
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not remove tool bars from the main window
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65104
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ilja Smoli
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See if this works for ya
window.open(blah);
window.opener = self;
window.close();
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic