Moving the Window to a desired Location

Rajesh_Kumar
Posted by Rajesh_Kumar under JavaScript category on | Points: 40 | Views : 535
We can use the window.moveTo function to move the popup window to a desired location.
The code below shows positioning the popup at a desired location.

<script type="text/javascript">
function open_win()
{
var win = window.open("http://www.dotnetfunda.com","open_win","location = 1,status = 1,scrollbars = 1,width = 250,height = 300");

win.moveTo(0,0);
}
</script>

//Now call above function in any button and move as you want.

Comments or Responses

Login to post response