PROGRAMMING SOLUTIONS

Saturday 1 August 2009

How to open a popup window using javascript

Pass the following parameters to the OpenPopup fucntion and call it through your javascript code.


url2open = "http://developers-hell.blogspot.com/";
w = 400;
h = 300;
wndName = "Developers-hell";

function OpenPopup(url2open, w, h, wndName) {
mywindow = window.open (url2open, wndName, 'location=1,status=1,scrollbars=1,width='+w+',height='+h+'');
mywindow.moveTo(20,20);
mywindow.focus();
}


Test it!

No comments:

Post a Comment