Wednesday, December 22, 2010

HTML : pop-up window

<script language="JavaScript">
function PopupMe1(){
myleft=(screen.width)?(screen.width-300)/2:100;mytop=(screen.height)?(screen.height-200)/2:100;
settings='top=' + mytop + ',left=' + myleft + ',width=300,height=200,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,fullscreen=no'
PopupWin1=window.open('sample.htm','PopupWin1', settings);
PopupWin1.focus();}
</script
<a href="javascript:PopupMe1()">Click here</a>

No comments:

Post a Comment