TechAid24

Your Technical Consultant

Display custom size web form using JavaScript

Posted on by Selim Ahmed 1 minute read

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#.

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;
Display custom size web form using JavaScript

Tags:

Selim Ahmed

Thank you for visiting my personal blog. I’m Selim Ahmed, a tech-savvy who loves to learn a new technology every day. Innovation, research, and development is my daily activities. I love to work in a place where I can learn, innovate, and develop new things.Please feel free to reach me on any comments and feedback you have. I would be more than glad to listen and reply.

Leave a Reply

Your email address will not be published. Required fields are marked *