Friday, 19 October 2012

popup in javascript in asp.net c#

<a href="javascript:void(0);" onclick="popup('http://www.google.com',
'googlePopup',700,600);">OPEN GOOGLE</a>
and the javascript function is
function popup(pageURL, title, popupWidth, popupHeight)
    {
        var left = (screen.width / 2) - (popupWidth / 2);
        var top = (screen.height / 2) - (popupHeight / 2);
        var targetPop = window.open(pageURL, title, 'toolbar=no, location=no, directories=no,
status=no, menubar=no, scrollbars=YES, resizable=YES, copyhistory=no, width=' + popupWidth + ',
height=' + popupHeight + ', top=' + top + ', left=' + left);
    }

No comments:

Post a Comment