Tuesday 8 May 2012

Popup in asp.net

HTML Code:-

Inside the Head tag of  .aspx page:-

<script type="text/javascript">
     function popup(mylink, windowname) {
        if (!window.focus) return true;
        var href;
        if (typeof (mylink) == 'string')
            href = mylink;
        else
            href = mylink.href;
        window.open(href, windowname, 'width=700,height=350,scrollbars=yes');
        return false;
    }
 </script>

<body>
<form id="form1" runat="server">
    <div>
      <a  href =" http://dotnetmasty.blogspot.in/"  onclick="return popup(this,'example')">Pop-Up</a>
     </div>
    </form>
</body>


No comments:

Post a Comment