How can I serve an HTML banner to people who don't have Flash, and a Flash banner to people who do?
June 21, 2004 11:30 PM   Subscribe

I've got a Flash file banner, and an HTML equivalent, with the requirement that people without Flash don't get asked to install it and just get the HTML version...

...I'm using the Quirksmode Flash detect javascript and now have the appropriate div hiding and revealing, but they still get asked to install Flash because the Flash is part of the page.

So I tried writing the Flash's <embed> <object> dynamically but that didn't work either. The Flash banner just didn't appear.

So is there a way of doing this? I've tried google but I can't find anything about this.

I'll name my firstborn after the correct answerer's mefiname.
posted by holloway to Computers & Internet (6 answers total)
 
Oh, and by "dynamically" I mean I wrote the object/embed tags in as a surrounding divs' innerXml.

I guess this question is about how to add Flash objects to a page dynamically, without having an object/embed tag to start with.
posted by holloway at 11:42 PM on June 21, 2004


Hmmm. Can you do anything with content negotiation?
posted by i_am_joe's_spleen at 1:14 AM on June 22, 2004


See this PHP example.
posted by i_am_joe's_spleen at 1:15 AM on June 22, 2004


Eric Costello figured it out - we do it on Flickr, showing a jpeg wrapped in a swf (to display notes) if it is available and a normal jpeg if not. Here's an example: feel free to steal the code (we're writing the embed/object out dynamically and it works in IE/Moz/Safari.
posted by sylloge at 2:41 AM on June 22, 2004


The moock fpi has never let me down. Simple JavaScript includes.
posted by yerfatma at 3:53 AM on June 22, 2004


Is this not a case for Inman Flash Replacement or even WAC-FR?
posted by joeclark at 3:15 PM on June 22, 2004


« Older Is there a free alternative to WS-FTP?   |   Intelligent, Cool, Conservative, Quiet... Newer »
This thread is closed to new comments.