Sunday, May 14, 2017

Center dice html popup

<script>

  function CenterWindow(windowWidth, windowHeight, windowOuterHeight, url, wname, features) {
    var centerLeft = parseInt((window.screen.availWidth - windowWidth) / 2);
    var centerTop = parseInt(((window.screen.availHeight - windowHeight) / 2) - windowOuterHeight);

    var misc_features;
    if (features) {
      misc_features = ', ' + features;
    }
    else {
      misc_features = ', status=no, location=no, scrollbars=yes, resizable=yes';
    }
    var windowFeatures = 'width=' + windowWidth + ',height=' + windowHeight + ',left=' + centerLeft + ',top=' + centerTop + misc_features;
    var win = window.open(url, wname, windowFeatures);
    win.focus();
    return win;
  }
</script>

</head>

<body>
<a href="javascript:void(0)"
   onclick="CenterWindow(1000,800,100,'http://10.1.1.176/live');">Click here</a>
 
 
 

No comments:

Post a Comment

phprunner view custom filed status

if ($value=="Process") $str.='<img src="1.png">'; if ($value=="Receive") $str.='<i...