Hi,
I am trying to load some code depending on what operating system the users are using. I basically want to load the content on all operating systems except linux.
This is the code I have so far, but I am not too sure how to go about it and if it will work:
if (navigator.appVersion.indexOf("Linux")!=-1){
//hide the following code from Linux
LoadFlash : function(flash_path, width, height){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ width +'" height="'+ height +'">');
document.write('<param name="movie" value="'+ flash_path +'"/><param name="quality" value="best"/><param name="wmode" value="transparent"/><param name="play" value="true"/><embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+ flash_path +'" type="application/x-shockwave-flash" wmode="transparent" quality="best" play="true" width="'+ width +'" height="'+ height +'"></embed>');
document.write('</object>');
}
}
else {
//load the code for all other operating systems
LoadFlash : function(flash_path, width, height){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ width +'" height="'+ height +'">');
document.write('<param name="movie" value="'+ flash_path +'"/><param name="quality" value="best"/><param name="wmode" value="transparent"/><param name="play" value="true"/><embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+ flash_path +'" type="application/x-shockwave-flash" wmode="transparent" quality="best" play="true" width="'+ width +'" height="'+ height +'"></embed>');
document.write('</object>');
}
}
I am not sure how to hide the content in the if statement.
Any ideas?
Thanks!