Thursday, August 2, 2012

Javascript Pop UP

<head runat="server">
    <title></title>
    
<script type="text/javascript" language="javascript">
        function Add() {
            var left, top;
            var pos = new Array;
            pos = Positions(700, 500);
            left = pos[0];
            top = pos[1];
            var position = "channelmode=no,scrollbars=yes, width=700,height=500, left=" + left + " , top=" + top;
            popup = window.open("Default4.aspx","hi",position);
        }
      function Positions(windowWidth,windowHeight)
    {
var position = new Array;
position[0]=0;
position[1]=0;

if (windowWidth>0)
  position[0]=(screen.width- windowWidth) /2 

if (windowHeight>0)
  position[1]= (screen.height- windowHeight) /2
  
return position
}
    </script>


</head>

<body>
    <form id="form1" runat="server">
    <div>
       <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="javascript:Add();"/>
    </div>
    </form>
    </body>
</html>
<body>
    <form id="form1" runat="server">
    <div>
       <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="javascript:Add();"/>
    </div>
    </form>
    </body>
</html>


Click on the Image




No comments:

Post a Comment

Thank you for visiting my blog

Kubernetes

Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...