Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can i hide the address bar?

 
Sudharshan Reddy Ch
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
How can i hide address bar of the browser?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64712
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing to do with JSP, so moved to the HTML forum.
 
Zip Ped
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sudharshan Reddy Ch
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kailash

Its working, but how can i run a javascript function whenever i open the particular file in browser?
 
Zip Ped
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry, i gave it like body onLoad equalsto init().
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pop up windows are blocked by pop up blockers with onload.

Eric
 
Anil Karamchandan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 4319
236
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suneel, were you aware that the last activity on this topic was 4 years ago
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic