Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2005
    Posts
    365
    Thanks
    7
    Thanked 1 Time in 1 Post

    Question How to disable address bar of JS Popup Window?

    Hi Experts,

    I am trying to open a popup window on clicking a link. It works fine, but all I need now is to disable the address/URL bar from the window for all browsers.
    I am using the below script...

    Code:
    <script type="text/javascript">
    <!--
    function popup(url) 
    {
     var width  = 600;
     var height = 400;
     var left   = (screen.width  - width)/2;
     var top    = (screen.height - height)/2;
     var params = 'width='+width+', height='+height;
     params += ', top='+top+', left='+left;
     params += ', directories=no';
     params += ', location=no';
     params += ', menubar=no';
     params += ', resizable=no';
     params += ', scrollbars=yes';
     params += ', status=no';
     params += ', toolbar=no';
     newwin=window.open(url,'windowname5', params);
     if (window.focus) {newwin.focus()}
     return false;
    }
    // -->
    </script>
    Code:
    <a href="javascript: void(0)" 
       onclick="popup('/examples/index.php')">preview</a>
    Please guide me how can I do that...

    Thanks.

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Posts
    365
    Thanks
    7
    Thanked 1 Time in 1 Post
    Useless !!!

    You didn't read my post I think.

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    You can't. Security feature. Someone could easily set up a phishing website for Paypal, and modify the url to say paypal.com instead of whatever false url they were using before. If any browser were to adopt this ability all users of that browser would be at risk.

    Why would you even ask for such a thing to be possible? Please tell us of a legitimate reason.


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


  •  

    Posting Permissions

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