Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
804
get width and get height
posted

I just want to know how to capture the width and the heigth of a webDialogWindow in a function javascript AND how to get the initial location (x, y) of the webDialogWindow. I try this:

 

function locateWebDialog(webPoubelle, evtArgs)

{

     var dialogWidth = evtArgs.get_width();

     var dialogHeight = evtArgs.get_heigth();

     var poubelleY = evtArgs.get_y();
     var poubelleX = evtArgs.get_x();

}

 

<ClientEvents Initialize="locateWebDialog" />

 

But it doesn't work, why

 

thanks you for the future help

Gabriel Deschênes

Parents
No Data
Reply
  • 995
    Suggested Answer
    posted

    Hi,

    You can use following JavaScript function to get position and size of the WebDialogWindow:

     

     

     

     

    <

     

    script type =

    "text/javascript">

     

     

    function

    locateWebdialog() {

     

     

    var window = $find('<%= WebDialogWindow1.ClientID %>'

    );

    alert(

     

    "The height is: " + window.get_height() + " The width is: " + window.get_width() + " The top is: " + window.get_top() + " The left is " + window.get_left());

    }

     

    </script>

Children
No Data