codice:<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Popup centrato</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> /* This script and many more are available free online at The JavaScript Source :: http://javascript.internet.com Updated by: Mike Weiner :: http://www.wearebent.com Original author: Eric King (eric_andrew_king@hotmail.com) Last Updated: May 2006 */ function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) { var int_windowLeft = (screen.width - a_int_windowWidth) / 2; var int_windowTop = (screen.height - a_int_windowHeight) / 2; var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + ''; var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties) if (parseInt(navigator.appVersion) >= 4) { obj_window.window.focus(); } } </script> </head> <body> <h1>Popup centrato</h1> Apri popup</p> </body> </html>