Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-27-2012, 08:42 PM   PM User | #1
GIDMEISTER
New to the CF scene

 
Join Date: Apr 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
GIDMEISTER is an unknown quantity at this point
I can't get window.open to get rid of address bar.

I have the following code:
var strAttribs = 'location=0,width=500,height=500,fullscreen=0,toolbar=0,status=0,menubar=0,titlebar=0,scrollbars=1,c opyhistory=0,resizable=0';

var mywin = window.open("vidseg.aspx?helpstr=" + sPage, 'HelpWindow', strAttribs);
mywin.moveTo(60, 60);
The window does open, but it has an address bar, with a url shown in it. I thought "location=0" would get rid of that, but it did not.
Any help is appreciated.
GIDMEISTER is offline   Reply With Quote
Old 11-27-2012, 08:59 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,036
Thanks: 197
Thanked 2,411 Times in 2,389 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by GIDMEISTER View Post
I have the following code:
var strAttribs = 'location=0,width=500,height=500,fullscreen=0,toolbar=0,status=0,menubar=0,titlebar=0,scrollbars=1,c opyhistory=0,resizable=0';

var mywin = window.open("vidseg.aspx?helpstr=" + sPage, 'HelpWindow', strAttribs);
mywin.moveTo(60, 60);
The window does open, but it has an address bar, with a url shown in it. I thought "location=0" would get rid of that, but it did not.
Any help is appreciated.
That is a security measure. You cannot suppress the address bar.

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Old 11-27-2012, 09:30 PM   PM User | #3
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,451
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Those browsers that will allow you to get rid of the address bar so that a new address cannot be entered will generally display the current page address somewhere else in the new window instead.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 11-28-2012, 05:59 PM   PM User | #4
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,455
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
for reduced chrome, you can use showModalDialog() instead, but even that usually has a url bar for security reasons.

using a modal dialog package instead often provides a better user experience due to popup performance and blockers and by simply staying on the same tab through the site visit lifetime.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:13 PM.


Advertisement
Log in to turn off these ads.