Results 1 to 3 of 3

Thread: Alternate content for clients without flash installed

  1. #1
    Join Date
    Jan 2006
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Alternate content for clients without flash installed

    Just looking for a simple script that would do this, any idea's or links would be great! Thank you!!!

    -Kevin

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Any element that is not pure html should have a pure html backup.

    The way of doing this is quite simple:
    Your page should be coded in just html (and css, as that is just for looks and will work, generally, for almost all browsers), and any elements beyond that (flash, javascript, etc.) should be added on top using conditional statements as necessary.

    Javascript that doesn't work in a browser is just ignored. So if you have a text element that you use javascript to make change colors, then a non-javascript browser will just see the regular text, not changing colors. That's fine. So javascript doesn't really need any conditional statements.
    Sometimes there are good ways to make it back compatible. For example, a javascript content link should have a pure html backup (like <a href="....." onclick="something(); return false;">) and you can then have everyone get the content and those who do have javascript have it the fancy way.

    For flash, this is a little more complex.

    First, flash itself cannot detect flash, because if they don't have it, then it won't be able to detect not existing.
    So you must use javascript.
    What you do is detect flash (google "detect flash javascript" and you'll find lots of results).
    Then use a conditional statement (if) to dynamically add the flash content to the page if they do have flash.
    If they do not have flash, do nothing (use the original html), or maybe use a javascript version.
    If they do not have javascript, nothing will happen (the original html will remain the same).

    This is a little complex to deal with and roundabout, but it works well.
    The only real problem is that a user might not have javascript and might have flash and in this case they would not see the flash content. However, very few people would actually fall in this category and there isn't much you can do for them anyway.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    With Flash there is a more direct approach. First you need to use either a single object tag or two nested object tags for your Flash content. The object tag is the only valid tag for Flash anyway, and it affords alternate content for non-supporting browsers. I'm not going to go into all of the details of the object tag at the moment. For the purposes of this issue, all you need is the basic structure:

    Code:
    <object>
    <param></param>
    alternate content (text and/or HTML code) may go here
    </object>
    Hopefully you get the picture.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    djr33 (12-12-2009)

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
  •