SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Non-Member
    Join Date
    Jun 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Browser javascript to detect if the browser is MAC Firefox or not?

    I need an inline browser javascript to detect if the browser is MAC
    Firefox and to load a gif. If not mac firefox load an SWF.

    eg:

    detect if Mac firefox if yes load src="/content/flash/WYD03.gif"

    if other browser load src="/content/flash/WYD03.swf"

    is this possible?

    I would need it to be in the code NOT in the header as there are
    several swf's on one page and Mac Firefox is making the SWF on top of
    all other divs therefore not displaying the divs.

    see the problem here beamcreative.com/menutest.aspx

    index does not work with .swf files. I have a work around for all
    other browsers but Mac/Firefox has a bug that prevents SWF files to be
    at the bottom layer.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,700
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    The swf that appears to be on the bottom could just as easily be an animated gif, thus ridding you of the swf issues with it.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast benno23's Avatar
    Join Date
    May 2008
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @idaba: Are you using this parameter in your code?
    Code:
    <param name="wmode" value="transparent">
    This will allow you to use the z-index CSS display property to move your flash content to a lower layer. You can get this to work on a MAC I promise you.

    Are you using swfobject?
    It is the best way to embed flash content.


    This well written script from Quirksmode will help you to detect browsers and operating systems.

    @pmw57: gifs are very low quality compared to swfs. Especially when youre talking about photos. swf can also do vector graphics which is a nice feature.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •