Fejl
Hej, browseren kommer med en "object required" ved linien "var ww = (IE)?document.body.clientWidth : window.innerWidth;"Problemet ligger egentligt ikke i denne linie, fordi fejlen er opstået efter, at jeg har indsat nogle flere parametere i hele scriptet.
<script language=javascript>
function PopWin(url,menubar, toolbar, location, status, scrollbars, resizable, h, w) { var ww = 480, wh = 340, leftPos = null, topPos = null;
IE=(document.all)?true:false;
var wh = (IE)?document.body.clientHeight : window.innerHeight;
var ww = (IE)?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, 'popup_text', 'menubar=' + menubar + ', toolbar=' + toolbar + ', location=' + location + ', status=' + status + ', scrollbars=' + scrollbars + ', resizable=' + resizable + ',height=' + h + ',width=' + w + ',top=' + topPos + ',left=' + leftPos +'')
}
</script>
<%
if not Request.QueryString("gotoUrl") = "" Then
response.write"<script>PopWin('" & Request.QueryString("gotoUrl") & "','yes', 'yes', 'yes', 'yes', 'yes', 'yes', 400, 400);</script>"
end if
%>
