Skip to main content

Popup form on Screen Center Javascript


Popup Form on Center 

to popup the form on Screen Center use the below Script

Example :

<script language="javascript">
var popupWindow = null;
function centeredPopup(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
popupWindow = window.open(url,winName,settings)
}
</script>
<p><a href="http://www.quackit.com/common/link_builder.cfm" onclick="centeredPopup(this.href,'myWindow','500','300','yes');return false">Centered Popup</a></p>

Comments

  1. Hi Bharath Sir ,... for popup window without using AJAX .., i want to remove new technologies using this this type of technques

    ReplyDelete
  2. Javascript is the popular tool in Web Application ...

    for any Ideas share on your opinion ..

    Thanking you

    ReplyDelete

Post a Comment