SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: check flash

  1. #1
    SitePoint Enthusiast hafez's Avatar
    Join Date
    Feb 2006
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    check flash

    HI All
    I need to check if the any flash object using javascript , I tried to check if there object tag by this code but it fails

    Code:
    if(document.getElementsByTagName('object') ){
    		alert('there are flash');
    	}else{
    		alert('no flash');
    		
    	}
    any ideas, please.

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe document.getElementsByTagName('object').length > 0?

    There are better ways to check for it though - sIFR and Flash Satay have flash-sniffer scripts you could look at.

  3. #3
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


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
  •