locked
How to set popup window size? RRS feed

  • Question

  • User-2004110967 posted
    I use Hyperlinks to link to popups and set target = "_blank". I want to set popup window size and disable toolbar and scroll bar. How to do?
    Tuesday, October 21, 2008 11:29 PM

Answers

  • User1739692300 posted

    u can do it like this..:) 

    function
    openpopup()

    {

    window.open("EditRequest.aspx",'windowname1','width=650, height=700,toolbar=no,status=no');

    }

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 22, 2008 12:59 AM
  • User-87879820 posted
    Hi please use this code. 
        <script language="javascript" type="text/javascript">
    <!--
    function popitup(url)
    {
    newwindow=window.open(url,'name','height=200,width=150');
    if (window.focus) {newwindow.focus()}
    return false;
    }

    // -->

    </script>

     and Here is the tag for href 
    <a href="~/default4.aspx" onclick="return popitup('~/default4.aspx')">Update</a>
    Change the page name and querystring according to your specs.
     Hope this will work. 
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 22, 2008 1:43 AM

All replies

  • User1739692300 posted

    u can do it like this..:) 

    function
    openpopup()

    {

    window.open("EditRequest.aspx",'windowname1','width=650, height=700,toolbar=no,status=no');

    }

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 22, 2008 12:59 AM
  • User-87879820 posted
    Hi please use this code. 
        <script language="javascript" type="text/javascript">
    <!--
    function popitup(url)
    {
    newwindow=window.open(url,'name','height=200,width=150');
    if (window.focus) {newwindow.focus()}
    return false;
    }

    // -->

    </script>

     and Here is the tag for href 
    <a href="~/default4.aspx" onclick="return popitup('~/default4.aspx')">Update</a>
    Change the page name and querystring according to your specs.
     Hope this will work. 
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 22, 2008 1:43 AM
  • User-2004110967 posted
    Thank you. It works!
    Wednesday, October 22, 2008 1:49 AM
  • User1739692300 posted

    onclick="openpopup()"

    Wednesday, October 22, 2008 1:55 AM
  • User-1046570768 posted

     

    Hi bluecode ,

          You can refer the below link :

                                                  http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

        Hope this will help you.

    Wednesday, October 22, 2008 2:24 AM