benutze ein javascript um ein neues fenster zu öffnen, nun möcht ich im javascript noch ein javascript zur browsererkennung einbinden.
hier ist der code woraus die seite geöffnet wird:
<html>
<head>
<title>1</title>
<script language="JavaScript">
<!--
function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) { // v4.01
newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
newWindow.document.open();
newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
if (imageType == "swf"){
newWindow.document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+imageWidth+'" height="'+imageHeight+'">');
newWindow.document.write('<param name=movie value="'+imageName+'"><param name=quality value=high>');
newWindow.document.write('<embed src="'+imageName+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+imageWidth+'" height="'+imageHeight+'">');
newWindow.document.write('</embed></object>'); }else{
newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="'+alt+'">'); }
newWindow.document.write('</body></html>');
newWindow.document.close();
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" topmargin="30" marginheight="30" leftmargin="0" marginwidth="0">
<a href="javascript:;" onClick="openPictureWindow_Fever('','../images/400/1000_012.jpg','400','400','100','','')"><img src="../images/150/100_000.jpg" height="150" width="150" border="0"></a>
</body>
</html>
und hier das javascript welches ich bei newWindow.document.write irgendwie einfügen sollte:
<script language="JavaScript">
<!--
function browsercheck(URL,altURL)
{
var is_netscape;
if((navigator.userAgent.indexOf("Netscape") != -1) &&
(parseInt(navigator.appVersion) <= 5.0))
is_netscape = true;
if (is_netscape)
resizeTo('+imageWidth+','+imageHeight+'+1);
else
resizeTo('+imageWidth+','+imageHeight+');
}
//-->
</script>
merci für eine antwort