Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

How can i hide the address bar?

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
How can i hide address bar of the browser?
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing to do with JSP, so moved to the HTML forum.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 336
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sudharshan Reddy Ch
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry, i gave it like body onLoad equalsto init().
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
pop up windows are blocked by pop up blockers with onload.

Eric
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 7251
1392
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suneel, were you aware that the last activity on this topic was 4 years ago
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

reply
    Bookmark Topic Watch Topic
  • New Topic