wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Hide address bar on a popup window 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 "Hide address bar on a popup window" Watch "Hide address bar on a popup window" New topic
Author

Hide address bar on a popup window

Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
Hi..,

I've got a peculiar requirement... and I know the seasoned ranchers would pounce on me, or show the link to the "don't do" pages... but this somehow seems logical to me, and hence I'm planning to implement.

I have a AWT based interface, on which there is a link, on click of which, a brower window needs to be opened with a few records, internal to this app. The problem is that, I dont want the user to see the address bar in this browser window [its like a popup directly from a swing app]. I somehow cannot use POST here [and dont ask me why.... lets say, that it is a limitation]. I tried googling for it, and found many links wherein I can accomplish this, if I'm launching the browser window from another browser window... but not to my "specialized" case. Can someone help me.... pleeeeeeeeze....

P.S : I need to support both IE and Firefox [only ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Modern day versions of browsers do not let you hide the address bar for security reasons.

Why are you using a pop up window? You have Ajax and iframes at your finger tips.

Eric
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
Thanks for looking into this, Eric.

The problem I have is that I need to show the responses in a web page itself [thats a mandatory customer requirement that I have absolutely no control upon].
These responses are, lets say a person's call history being fetched from a server in the telecom network. I understand that I could use POST here to effectiveness
so that the URL, though visible wouldn't have the input parameters visible to the unsuspecting user [which I cannot use because of another restriction], and then there is Ajax & Iframes,
which does everything behind the scenes, but the response has to be shown again on the webpage, whose address bar, I don't want to show.

I know I've already mentioned a lot of restrictions.... so basically I need to dance from within this very small circle. Are you aware of any Javascript/CSS tweak which
could do this job for me ? Google has ditched me... so my only hope left is the ranch.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not hide the url unless the browser settings are changed.

Ajax can show the response, you just have to write it out.

Iframes can be placed on top of the current window.

Other than that, you have to tell your client they need to manually go and change all the user's browser settings or live with the url.

Eric
suresh dasari
Ranch Hand

Joined: Oct 05, 2009
Posts: 121

Hi guys,

did anyone found the answer to hid the address bar when opening a new window.
I searched a lot, but couldnt get it,
please can anyone help in this???


Sun Certified Java Programmer with 93 percent
seomul evans
Greenhorn

Joined: Jan 07, 2010
Posts: 2
suresh dasari wrote:Hi guys,

did anyone found the answer to hid the address bar when opening a new window.
I searched a lot, but couldnt get it,
please can anyone help in this???


I have the same question


SEO Services | Internet Marketing | Internet Marketing Blog | SEO
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61224
    
  66

seomul evans wrote:I have the same question

The question has already been addressed: you can't. Move on.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
suresh dasari
Ranch Hand

Joined: Oct 05, 2009
Posts: 121

Hi Bear,

That shouldnt be the case I think, there might be some way to resolve this, because for security reasons many people dont want to show the URL.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
suresh dasari wrote:Hi Bear,

That shouldnt be the case I think, there might be some way to resolve this, because for security reasons many people dont want to show the URL.


If hiding a URL is a security measure, the app is designed wrong.

It is a security measure for the person to see the actual URL of the page to make sure they are on the site they think they are on.

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61224
    
  66

suresh dasari wrote:That shouldnt be the case I think, there might be some way to resolve this, because for security reasons many people dont want to show the URL.

Just because you want there to be a solution doesn't mean that there is one. I want a million bucks to magically appear in my checking account, but that's not going to happen either.
suresh dasari
Ranch Hand

Joined: Oct 05, 2009
Posts: 121

Ok, then if you run the same application in IE, there is not URL showing on the window.
so I was asked the same question the why it is working in IE as expected and why not it is possible in firefox.

Eirc,
Sorry if I am irritating you.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Forefox has a setting to not allow scripts to hide the address bar. IE8 has the setting too. There is NOTHING you can do about it other than go to every single user's machine that uses your site and disable the feature.

As stated many times in this thread and others: Hiding the address bar is NOT a security feature. If you think it is with your application, than your application is designed wrong. Anyone with basic knowledge of browsers can get the address in many ways.

There is no solution to this with modern day browsers. Tell your boss this and say the requirement is impossible in modern day browsers. If he does not believe you, find a new place of employment.

Eric
chandra iyer
Greenhorn

Joined: Feb 11, 2010
Posts: 1
It is possible to hide the address bar maybe by way of a popup.

http://saher42.wordpress.com/2006/08/10/hiding-the-address-bar-on-pageload-using-javascript/

visit this site. the author has beautifully done it.

I have tried and its working (address bar hides) in IE 7 and Opera 9.64

FYI, in certain intranet applications where the developer, maybe even the clients does not want the users to play around with the URL, like to hide the address bar.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
chandra iyer,

As stated it is impossible in modern day browsers because they show the address to the page. As stated many many many times, it is horrible to think security is hiding an address.

That code is also not beautiful, they coded it to the standard of window.open. lol

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61224
    
  66

chandra iyer wrote:FYI, in certain intranet applications where the developer, maybe even the clients does not want the users to play around with the URL, like to hide the address bar.

Hiding the address bar in popups does absolutely nothing to help this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hide address bar on a popup window