Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 29th, 2003, 12:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default Flash detect

Hi there

Can anyone help me with this bit of javascript: it's a flash detection script but all it seems to do for me is write <'image_bin/noflash.gif' alt='Download Flash Plug In' \/> on the page!

I do have flash installed on my machine but it seems not to be picking it up.

Please find script below:

<script language="javascript" type="text/javascript">

<!-- Hide script from older browsers

if (navigator.plugins["Shockwave Flash"]) {

document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0'><param name='movie' value='swf_bin/intro.swf'><emdbed pluginspage='http://www.macromedia.com/shockwave/download/' src='swf_bin/intro.swf'><\/embed><\/object>")

}

else {

document.write("<'image_bin/noflash.gif' alt='Download Flash Plug In' \/>")

}

// End hiding script from older browsers -->
</script>

thanks alot

Adam
 
Old October 29th, 2003, 04:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just a suggestion, Macromedia has a complete kit for detecting Flash.
http://www.macromedia.com/software/f.../detection_kit
 
Old October 30th, 2003, 05:07 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

And it's a Navigator only script, IE doesn't list plugins under plugins, only embedded objects.

--

Joe
 
Old October 30th, 2003, 07:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

OK, will go with that!

thanks
 
Old October 30th, 2003, 08:00 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

There's a Flash detect script here http://www.javascriptkit.com/script/...indetect.shtml which claims to work in NS and IE. Never tried it myself...

hth
Phil





Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect Username dparsons ASP.NET 1.0 and 1.1 Professional 2 April 12th, 2006 02:20 PM
Detect Change jking SQL Language 2 May 27th, 2005 05:57 PM
Help detect error elania Beginning PHP 4 February 14th, 2005 09:55 PM
Detect MDAC dunnie VB How-To 8 July 17th, 2003 03:09 PM
Flash detect Adam H-W Flash (all versions) 1 June 18th, 2003 08:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.