views:

17

answers:

1

Basically, I need to swap a JSP form with a Flash form should the user have it installed. I know there is a JavaScript option, but don't want to use this as that cuts out people who have Flash but not JavaScript.

Can't find anything for it online, I'm sure it can't be too difficult, any ideas? Some code would be jubbly if possible :)

+2  A: 

Javascript is the right way to do this. The other alternative would be to attempt to launch a small flash app, and have the flash application request a redirect to something loading the full application. If the initial flash app were small enough, it could be hidden or made invisible to the non-flash users.

But really, that's a bad idea, and you should just use Javascript to detect it. The number of users with no Javascript but with Flash will be vanishingly small.

See also http://www.petefreitag.com/item/70.cfm and http://stackoverflow.com/questions/730654/how-can-i-reliably-detect-if-flash-was-the-originator-of-a-request-to-a-service for http header based approaches (as well as their limitations).

jsight
In the end JavaScript was used, despite creating a larger gap, just couldn't find a good enough server side solution (atleast one that was free)
Mr Carl