Jump to content

Hide object dependant on browser


liamloveslearning

Recommended Posts

Hi everyone,

 

I have an object on my web page which fails to load in ie, Ive been reading about browser detection (http://www.quirksmode.org/js/detect.html) to see if thats an option to hide the flash object dependant on browser only I cant get my head arround it. Does anybody know of any tutorials or where I can figure this out?

 

The code im having bother with it...

<object id="o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="701" height="260"><param name="movie" value="http://apps.cooliris.com/embed/cooliris.swf" />

<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="always" />
<param value="transparent" name="wmode" />
<param name="flashvars" value="feed=api://www.flickr.com/?user=signworldgroupn&numRows=3&glowColor=#FFFFFF&style=light" />
<embed type="application/x-shockwave-flash" src="http://apps.cooliris.com/embed/cooliris.swf" flashvars="feed=api://www.flickr.com/?user=signworldgroup&numRows=3&glowColor=#FFFFFF&style=light" width="701" wmode="transparent" height="260" allowfullscreen="true" allowscriptaccess="always" /></object></div>

 

 

Link to comment
https://forums.phpfreaks.com/topic/188454-hide-object-dependant-on-browser/
Share on other sites

Hi everyone,

 

I have an object on my web page which fails to load in ie, Ive been reading about browser detection (http://www.quirksmode.org/js/detect.html) to see if thats an option to hide the flash object dependant on browser only I cant get my head arround it. Does anybody know of any tutorials or where I can figure this out?

 

The script

 

Copy this script into your JavaScript files. It works immediately, and you can query three properties of the BrowserDetect object:

 

Browser name: BrowserDetect.browser

Browser version: BrowserDetect.version

OS name: BrowserDetect.OS

 

I wouldn't rely on it but it works like:

<script type="text/javascript" src="browserdetect.js"></script>
<script type="text/javascript">
BrowserDetect.init();
alert("You're using " + BrowserDetect.browser + " " + BrowserDetect.version + " on " + BrowserDetect.OS);
</script>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.