Open a popup window with

A javascript function that opens a new window with various kind of settings.


This function generates popup window using method in javascript

function PopupCenter(pageURL, title,w,h) {
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	var targetWin = (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);


You can call it with the following code.

     PopupCenter('', 'Google', 300, 200);

Share the love

1 comment

ed hardy
Mon, 18th January 2010
good Reply

Leave a Comment

Please keep in mind that comments are moderated and rel="nofollow" is in use. You can use [code][/code] if you want to write codes. Don't spam us :) Thanks!