You must Sign In to post a response.
  • Category: JavaScript

    Hide addressbar in a popup window

    I want to hide addressbar in popup window.

    Am unable to hide it in chrome


    Below is the clienside code used:

    var settings = 'scrollbars=1,addressbar=no,toolbar=0,statusbar=no,menubar=no,height=' + height;
    settings = settings + ',width=' + width;
    settings = settings + ',top=' + top;
    settings = settings + ',left=' + left;

    var url = 'VACPTCodeBySite.aspx?caseid=' + caseidtmp + '';
    window.open(url, 'new', settings);
  • #748475
    use this if it works
    location=yes|no|1|0

    not to display the address field. Default is yes

    I guess
    Because of security standard; this may not be allowed.

    Better to wait for someone to reply

    Regards
    Kush

  • #748507
    Please check the below url if it helps:
    thinkexploit.blogspot.in/2013/05/hiding-address-bar-in-pop-up-window.html

    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

  • #748590
    Try the below sample code for the same.



    var msgWindow = null;
    function showFileView(iId)
    {
    msgWindow = window.open("FileContentView.aspx?fileid="+iId, "tinyWindow", 'status=1, resizable=1, scrollbars=0, width=650,height=480');
    msgWindow.focus();
    if(!msgWindow.closed)
    {
    if(navigator.appName == "Netscape")
    msgWindow.location.refresh;
    else
    msgWindow.location.reload(true);
    msgWindow.focus();
    }
    }


    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #748612
    function showFileView(iId)
    {
    msgWindow = window.open("FileContentView.aspx?fileid="+iId, "tinyWindow", 'status=1, resizable=1, scrollbars=0, width=650,height=480');
    msgWindow.focus();
    if(!msgWindow.closed)
    {
    if(navigator.appName == "Netscape")
    msgWindow.location.refresh;
    else
    msgWindow.location.reload(true);
    msgWindow.focus();
    }

  • #748720
    <script language="javascript">

    function popUp2(URL)
    {
    eval("page" + " = window.open(URL, '" + "', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width=980, height=710, left = 20, top = 10');");
    }

    </script>

    <a href="javascript:;" onclick="popUp2('test.asp')" style="text-decoration: none">Test</a><br>

    Regards
    Dharmendra


  • Sign In to post your comments