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
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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.