Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Detect if user has Flash

    Hi I'm an ASP developer.

    I have a site for a client of mine where the initial page is Flash.

    But the client said that some people don't have Flash installed so he would like a link to show up to obtain Flash:
    http://www.macromedia.com/shockwave/.../download.cgi?

    But here is the trick - he would only like the link to show up if the user does not already have Flash installed.

    Is there a way to do this - perhaps with JavaScript somehow?

    Thanks in advance!
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    First of all, I would challenge the base assumption - you can safely assume that the only people who don't have Flash don't have it by choice or necessity, not by accident or because they didn't know about it. So catering to people who don't have Flash means offering alternative content, not a link for them to download it.

    No detection script is necessary. <object> semantics include a mechanism for providing content to browsers that don't support the object mime-type. The basic syntax goes like this:
    Code:
    <!-- flash content -->
    <object type="application/x-shockwave-flash" 
    	data="flash_file.swf" width="500" height="350">
    
    	<param name="movie" value="flash_file.swf" />
    	
    	<!-- noflash content -->
    	<p>
    		... etc ...
    	</p>
    
    </object>
    Plus whatever other <param/>s you're using.
    Last edited by brothercake; 09-02-2004 at 10:54 PM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    That looks great - and I love it when I can keep things simple - thanks a lot!!!
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips


  •  

    Posting Permissions

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