aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How can i hide the address bar? 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 "How can i hide the address bar?" Watch "How can i hide the address bar?" New topic
Author

How can i hide the address bar?

Sudharshan Reddy Ch
Ranch Hand

Joined: Jul 12, 2006
Posts: 36
Hi all,
How can i hide address bar of the browser?


Cheers,
Sudha C Reddi
http://techelp.in
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

Nothing to do with JSP, so moved to the HTML forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I think we were unable to hide the bar on a window that's already open, so we launch our application in a new window.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
Programmaticaly you can hide the address bar in IE using Javascript but you'll have to open a new window to see the address bar hidden.

If you are using Mozilla or Netscape you can remain on the same window and still hide the address bar, standards buttons bar etc. Please google for the javascript in this case.

Sample code(IE):



If you need to hide the address bar temporarily, just right click on your IE toolbar and uncheck the address bar option.
Sudharshan Reddy Ch
Ranch Hand

Joined: Jul 12, 2006
Posts: 36
Thanks Kailash

Its working, but how can i run a javascript function whenever i open the particular file in browser?
Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
Use the <body> tag's onload attribute to invoke the function or use the javscript init() function in your script which runs every time your page loads.
Sudharshan Reddy Ch
Ranch Hand

Joined: Jul 12, 2006
Posts: 36
its not working if i'm calling with onLoad funtion. I called the function using body tag as body onLoad("func()"). it didnt work using init also.




its not allowing me to embed my code in my reply, how can i embed my program in my reply.
Sudharshan Reddy Ch
Ranch Hand

Joined: Jul 12, 2006
Posts: 36
sorry, i gave it like body onLoad equalsto init().
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
pop up windows are blocked by pop up blockers with onload.

Eric
Anil Karamchandan
Ranch Hand

Joined: Sep 12, 2009
Posts: 47
the solution given by Stan James was helpful however this works only in firefox, not in IE, in IE I still get the address bar on the top

any hints how do we do it in IE.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3053
    
  36

Suneel, were you aware that the last activity on this topic was 4 years ago

Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Nothing like a 4 year old post being risen from the dead.

With modern day browsers it is impossible because new security practices will not allow the address bar to be hidden. It will be in a read-only type of state so the user can see where the page is located. There is no way around this.

In this day in age, I wonder why people use pop up windows at all. Use a layer on the page with an iframe/ajax to get the content to be displayed.

Eric
Anil Karamchandan
Ranch Hand

Joined: Sep 12, 2009
Posts: 47
HI Eric,

well there is always a requirement, actually I am generating a pdf doc and I am displaying the pdf in the pop up (new window). the code below and the code which I have (same code basically) works only in Firefox and chrome but not in IE. In IE it still displays the location (address bar).

when you have a requirement, you need to fulfill it, its not worth asking for a workaround.. if the client is happy you are happy :P

anil
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Suneel sharma wrote:HI Eric,


when you have a requirement, you need to fulfill it, its not worth asking for a workaround.. if the client is happy you are happy :P

anil


Guess what, you have a requirement that is IMPOSSIBLE. You will not be able to do it in this day in age of modern browsers. Tell your boss it can not be done. If there was a solution, I would tell you.

Eric

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can i hide the address bar?