CODEDIGEST
Home » CodeDigest
Search
 

Technologies
 

How to open a popup window at a specific location of your screen ?
Submitted By Bala Murugan
On 3/6/2010 11:42:43 AM
Tags: CodeDigest,javascript  

How to open a popup window at specific location of your screen using javascript?

 

Sometimes, there will be requirements to open your popup windows at specific location of your screen.

 

This can be done by passing the x and y coordinates in MoveTo() method of the window object.

 

 The below javascript code can used to move a popup window to location (100,0) of your screen.

 

function OpenWindow(strChildPageUrl)
{
  var testwindow = window.open(strChildPageUrl,"Child","width=400px,height=400px,top=0,left=0,scrollbars=1");
        testwindow.moveTo(100,0);
}

 

Do you have a working code that can be used by anyone? Submit it here. It may help someone in the community!!

Recent Codes
  • View All Codes..