SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    0 Post(s)
    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.


    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

    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
    Christchurch, New Zealand
    104 Post(s)
    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
    0 Post(s)
    0 Thread(s)
    @idaba: Are you using this parameter in your 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.


Posting Permissions

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