In this article, we want to discuss a nice function to Display custom-size web forms using JavaScript. Before we get started, if you want to know about how to call JavaScript from code, please go through the following article: Call JavaScript function from code behind in C#.
1 2 3 4 5 6 7 |
var windowWidth = 200; var windowHeight = 200; var windowLeft = parseInt((screen.availWidth/2) - (windowWidth/2)); var windowTop = parseInt((screen.availHeight/2) - (windowHeight/2)); var windowSize = "width=" + windowWidth + ",height=" + windowHeight + "left=" + windowLeft + ",top=" + windowTop + "screenX=" + windowLeft + ",screenY=" + windowTop; |
Leave a Comment