?
Solved

Hide Address Bar in Target Window

Posted on 2007-08-08
5
Medium Priority
?
5,376 Views
Last Modified: 2009-02-06
I am attempting to create a link that will open a new window with a given size (say, 1010x600) and with no address bar. I found this code elsewhere in these forums:

<A href="new_page.asp"
target="_new"
onClick="window.open(this.href,this.target,'status');
return false">New Page</a>

...and it does a great job, except that I ONLY want to restrict the address bar (not the menu bar or toolbar or status bar) and I want to designate the window dimensions. Will someone help me edit the code or tell me it's impossible? ;)

Thank you very much.
0
Comment
Question by:jkunrein
5 Comments
 
LVL 13

Assisted Solution

by:Onthrax
Onthrax earned 150 total points
ID: 19658131
Sure that's possible..

Just an example:

window.open('http://www.yoursitehere.com/','width=1024,height=768,scrollbars=no,toolbar=no,menubar=no');


You can have these options:

   1.  width
   2. height
   3. location
   4. status
   5. menubar
   6. directories
   7. toolbar
   8. resizable
   9. scrollbars

Good luck!
0
 
LVL 4

Accepted Solution

by:
jonathanmelnick earned 450 total points
ID: 19658201
Actually, the exact syntax is:

window.open('http://www.yoursitehere.com','jsNameOfWin','width=640,height=480,toolbar=no');

the 1rst param is for the website url, the 2second is the name of the win if you need to refer to it later, and finally the params...
0
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 150 total points
ID: 19658253
0
 
LVL 16

Expert Comment

by:LeeKowalkowski
ID: 19661976
That's it.  Except newer browsers are actually preventing the removal of the address bar these days (or at least still having the address somewhere visible in the window).

--
Lee
0
 
LVL 9

Author Comment

by:jkunrein
ID: 19662262
jonathanmelnick's code worked, except that it shut down all toolbars/scrollbars/status bar and I haven't yet found a way to do those things individually. Still experimenting with information provided by Onthrax and hernst42; thanks for the resources!

LeeKowalkowski -- Good point. My company is still on IE6 (sorry, I forgot to mention that) but I would rather create something as future-proof as possible.

Thanks, all!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question