Ciao ragazzi come mai questo codice non funziona se la pagina che lo contiene e all'interno di un frameset?
<script language="JavaScript">
<!--
function centra(url, width, height) {
if (document.all) {
var x = window.screenLeft;
var y = window.screenTop;
var w = window.document.body.offsetWidth;
var h = window.document.body.offsetHeight;
}
else {
var x = window.screenX;
var y = window.screenY;
var w = window.outerWidth;
var h = window.outerHeight;
}
var cntx = x + Math.round((w - width) / 2);
var cnty = y + Math.round((h - height) / 2);
window.open (url, null, 'left=' + cntx + ',top=' + cnty + ',width=' +
width + ',height=' + height +',scrollbars=1');
}
//-->
</script>
grazie a tutti .... è urgente![]()