?
Solved

Remove www address prefix from Javascript window, fix scrolling

Posted on 2006-04-03
10
Medium Priority
?
335 Views
Last Modified: 2008-03-17
When opening a Javascript window of a page, Mozilla and Firefox prefix the page header at top of window with -
http://www.whateversitenamerelatetopage.com
Even though I set a valid title for page.  IE do the same too, but when it finish loading page, IE correctly replace www address with the correct page title supplied for the page.

I do not want the web address to show at all, it is nuisance - just the normal page title, as you would see opening normal link to html page.  Please tell me how to fix.  Typical opener is -

window.open(newpage.html,"","status,height=550,width=470,scrolling=yes,resizable=yes,toolbar=0");

Also, even though I put scrolling=yes, neither IE or Moz/FF show v. scroll bars.  Can you fix this too?  Thx.
0
Comment
Question by:scrathcyboy
  • 5
  • 5
10 Comments
 
LVL 11

Expert Comment

by:mvan01
ID: 16369605
Hi,

Last question first.  Is your 'newpage.html' long enough to require scrolling in your new window?  Even with 'scrolling=yes', the browser doesn't need to add the scroll bars if there's no content to scroll.

Peace and joy.  mvan
0
 
LVL 11

Expert Comment

by:mvan01
ID: 16369628
Also, you need to add location=no to your list of window attributes in your open call:

window.open("newpage.html","","location=no,status=yes,height=550,width=470,scrolling=yes,resizable=yes,toolbar=0");

Peace and joy.  mvan
0
 
LVL 44

Author Comment

by:scrathcyboy
ID: 16374112
yes, tested with data longer than window size, but no scroll bar.  Very wierd, have not seen before.  I will try location=no, let you know.  thanks.
0
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.

 
LVL 44

Author Comment

by:scrathcyboy
ID: 16374416
I already had location=no in the other popup doing the same thing.  I added it to the first, and it makes no difference.  Perhaps I need to quote it?  Here are the two parameter lists for both popups -

     var features = "height=350,width=350,scrollbars=yes,status=no,menubar=no,location=no";

window.open(pg,"","status,height=550,width=470,scrolling=yes,resizable=yes,toolbar=0 location=no");

The both open popups in slightly different ways, both show the WWW location in Moz/FF.
0
 
LVL 11

Expert Comment

by:mvan01
ID: 16375359
nah.  Don't quote it.  The entire set of settings need to be in one string, and the values are not separately quoted.  Note that in the second one, you say "status, ... but not "status=no, ...  status, without an = sign means: status=yes,  but that's the status bar at the bottom of the browser.  

Here's a good source:
http://www.w3schools.com/htmldom/met_win_open.asp

It says scrollbars=no is supported.  No mention of scrolling= .  It's possible that it hits the scrolling=yes, realizes it is not supported, and does not finish with location=no, in your second example.  Check each parameter with the website listed above, to see if you've used each word exactly as they show.

Peace and joy.  mvan
0
 
LVL 44

Author Comment

by:scrathcyboy
ID: 16375819
changed order, put location=no at front, checked in console for JS errors on open popup -- no errors, still no scroll bars, and Moz/FF still showing location, but IE not  Am stumped.
0
 
LVL 44

Author Comment

by:scrathcyboy
ID: 16384033
I got the scrollbars to appear, a small JS error in another page was stopping this from working in Moz/FF, very unusual.  But with no errors at all now, the URL is still present, cant get rid of it in Moz/FF.
0
 
LVL 11

Accepted Solution

by:
mvan01 earned 800 total points
ID: 16384463
Hi scrathcyboy,

Now I see you said "in the page header at the top of the window" and "Even though I set a valid title for page."  So, you are talking about the 'titlebar,' not the location or address bar (where you can type in a url).

Look here to see some items associated with window.open which FireFox can more closely control.  It will limit what window.open can and cannot do.  This is configurable by the user for added security, to prevent spoofing, etc.:
http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries

Then, here's a site which tells how to change the constant portion of the titlebar.  You know, in IE it always says something like:
Website Title Goes Here - Microsoft Internet Explorer
with the ' - Microsoft Internet Explorer' being a fixed entry appearing in the titlebar.  (That can be changed by editing an entry in the Windows registry.)  In FireFox, this is configurable, and this page tells how.  I mention this because maybe that configuration can also be directed to place the current page address in the titlebar as well, though this specific article does not say so:
http://hacks.oreilly.com/pub/h/3356

Also, it may be very helpful to thoroughly check this out:
http://www.cosmicat.com/extensions/titletweak/

Peace and joy.  mvan
0
 
LVL 44

Author Comment

by:scrathcyboy
ID: 16385046
Thanks for those links mvan, you have spent long enough on this, I will close now, thx for the help again.
0
 
LVL 11

Expert Comment

by:mvan01
ID: 16385421
You are welcome.  Peace and joy.  mvan
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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