Example JavaScript for Zip or Cab Files

An HTML page could contain a JavaScript code segment such as the following to determine browser type and produce the proper HTML for the HotMedia.

<script language="JavaScript" >

//

// To generate APPLET tag for HotMedia Player 

//
	if (navigator.appName=="Netscape" && 

		navigator.appVersion.substring(0,1)=="3") { 
document.write('<APPLET name="HotMedia" code="hm.class" '+ 'archive="hm.zip"'+ 'width=320 '+ 'height=200 '+ 'MAYSCRIPT>'+ '<PARAM NAME="mvrfile" value="HotMedia.mvr">'); } else { document.write('<APPLET name="HotMedia" code="hm.class" '+ 'archive="hm.zip" '+ 'width=320 '+ 'height=200 '+ 'MAYSCRIPT>'+ '<PARAM NAME="cabbase" VALUE="hm.cab">'+ '<PARAM NAME="mvrfile" value="HotMedia.mvr">');
	}



</script>