Popup i fler browsere
HejFølgende kode skal pop'e et vindue op og det gerne virke i de største browsere, med andre ord koden skal også være netscape-venlig.
____________________________-
<script>
function PopWin(url, name, menubar, toolbar, location, status, scrollbars, resizable, h, w) { var ww = 480, wh = 340, leftPos = null, topPos = null;
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
ie5 =(document.getElementById)? true:false
ns6 = (document.getElementById && !document.all)?true:false;
var wh = (ie4||ie5)?document.body.clientHeight : window.innerHeight;
var ww = (ie4||ie5)?document.body.clientWidth : window.innerWidth;
if (top.screen){
if (screen.width){
leftPos = Math.round((ww-w-10)/2);
topPos = Math.round((wh-h-29)/2);
} else {
leftPos = 50
topPos = 50
}
}
popupWin = window.open(url, name, 'menubar=' + menubar + ', toolbar=' + toolbar + ', location=' + location + ', status=' + status + ', scrollbars=' + scrollbars + ', resizable=' + resizable + ', height=' + h + ', width=' + w + ', top=' + topPos + ', left=' + leftPos +'')
}
</script>
