SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    new window without address bar

    I want to open a new window without address bar in IE7 or IE8.
    Below is the code I used .It worked in FF but not in IE. any idea how to do that

    var width=300;
    var height=200;
    var from_top=350;
    var from_left=500;
    var toolbar='no';
    var location='no';
    var directories='no';
    var status='no';
    var menubar='no';
    var scrollbars='yes';
    var resizable='yes';
    var atts='width='+width+'show,height='+height+',top='+from_top+',screenY=';
    atts+= from_top+',left='+from_left+',screenX='+from_left+',toolbar='+toolbar;
    atts+=',location='+location+',directories='+directories+',status='+status;
    atts+=',menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable;
    var url = "/ems/ezrf_get_details.html?op_type="+key+"&title="+title +"#";
    window.open(url,'win_name',s atts);

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Modern browsers do not allow the address bar to be turned off. There must be something wrong with your Firefox security settings if it is allowing it.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Agreed, it's worth stating the reason for this though... it's done to prevent fraudulent sites from fooling users (if they can see the address bar they can see where their actually located and if it's secure). All of the major browsers showcase the address bar and you will be unable to turn it off.

  4. #4
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Stephen J Chapman for coming in for the answer. Yes even In FF it is not possible. We can manually remove it but not during the window. open()

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    You can change your browser settings to allow web pages to remove the address bar so that spoof web sites can con you out of all your passwords but you can't make anyone else change the security settings of their browser.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  6. #6
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another option would be to use a lightbox style window which opens the page up in an iframe on the page within a containing div. Although then you will not have native back/forward functionality.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •