Print Page | Close Window

what is wrong with that script?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4136
Printed Date: 29 March 2026 at 3:19pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: what is wrong with that script?
Posted By: BOB1
Subject: what is wrong with that script?
Date Posted: 08 July 2003 at 2:00pm

Hello all ,

I was trying to create a script that would show the user if he have FLASH installed.

this is the script :

<html>
<head>
<title>
for plug-in
</title>
</head>
<body>
<script>
<!-- Hide script from old browsers
hasshockwave=false
for(i=0; i<navigator.plugins.length; i++) {
     if(navigator.plugins.name.indexof("shockwave") >=0) {
        hasshockwave=true
     }
}
if(hasshockwave) {
document.write("u have flash")
}
else {
document.write("u don't have flash")
}
//End hiding script from old browsers-->
</script>
</body>
</html>

but it's not working and only shows me "u don't have flash" even if the user have.

Some1 know how 2 fix it? tnx




Replies:
Posted By: dead_angel
Date Posted: 08 July 2003 at 4:52pm
so does it show it if they haven't got flash installed? have you tried switching the text round.. there was an online offline mod a while back that did that, and the text needed swapping round and that solved it..


Posted By: ljamal
Date Posted: 08 July 2003 at 5:14pm
try spelling 'lenght' correctly

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: BOB1
Date Posted: 08 July 2003 at 6:36pm

didn't help ...



Posted By: BOB1
Date Posted: 09 July 2003 at 10:20am
up?


Posted By: the boss
Date Posted: 09 July 2003 at 9:56pm

down?

dear just go to some java script sites and grab the scripts to do that job for u.. BW thta a cleint side script and i gues they ar sometimes language dependnt of the browser of OS.. if u r running browser or OS in hebrew.. u may be have problem of scripts not working from ur PC



-------------
http://www.web2messenger.com/theboss">


Posted By: zMaestro
Date Posted: 10 July 2003 at 2:33am

I think this may help:

It contains much more than flash...

<SCRIPT language=VBScript>
<!--
VBXDetect ActX, "ShockWave Flash Plug-in", "ShockwaveFlash.ShockwaveFlash"
VBXDetect ActX, "ShockWave Director Plug-in", "SWCtl.SWCtl.1"
VBXDetect ActX, "ShockWave ActiveX Control Plug-in", "SWCtl.SWCtl.7"
VBXDetect ActX, "Active Shockwave Plug-in", "Macromedia.ActiveShockwave.1"
VBXDetect ActX, "Real Player Plug-in", "RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)"
VBXDetect ActX, "Real Player Plug-in", "rmocx.RealPlayer G2 Control"
VBXDetect ActX, "Real Juke Box", "IERJCtl.IERJCtl.1"
VBXDetect ActX, "Media Player", "MediaPlayer.MediaPlayer.1"
VBXDetect ActX, "Adobe Acrobat Reader Plug-in", "PDF.PdfCtrl.1"
VBXDetect ActX, "MS Agent 1.5", "Agent.Control.1"
VBXDetect ActX, "MS Agent 2.0", "Agent.Control.2"
VBXDetect ActX, "MS Animation Control", "ComCtl2.Animation.1"
VBXDetect ActX, "MS DirectAnimation Control", "DirectAnimation.DirectAnimationIntegratedMediaControl.1"
VBXDetect ActX, "Microsoft VRML 2.0 Viewer", "MSVRML2C.VRMLBrowserCtl.1"

document.write "<BR><BR><textarea cols=60 rows=20 name=""ActiveX"">ActiveX installed:==>"
document.write ActX
document.write """</textarea>"

Function VBXDetect(byRef str, byVal name, byVal activeXname)
  on error resume next
  If ScriptEngineMajorVersion >= 2 then
 VBXDetect = False
 VBXDetect = IsObject(CreateObject(activeXname))
 If (err) then
   VBXDetect = False
 End If
  Else
 VBXDetect = False
  End if
  If VBXDetect = True Then
     If (str <> "") Then
  str = str & ",--> "
     End If
  str = str & name & " [" & activeXname & "]"
  End If
  Return str
End Function
-->
  </SCRIPT>

 

 

 

IF you just want to check if the user has flash or not... just add a little script like.. If 'activeXname' is Flash installed.. then go to page ....., or something like this...., but the above is only used if you want to see the PlugIn user has....

 

hint: useful if you added this code to the contact us form.


 



Posted By: os008
Date Posted: 10 July 2003 at 3:11am

well nice job maestro, i tested it and it woked fine



Posted By: zMaestro
Date Posted: 10 July 2003 at 3:16am

----------------------------------------------------------[Deleted]



Posted By: BOB1
Date Posted: 14 July 2003 at 7:30am
tnx 4 the script but i want to know what is wrong with my script...i read all ur info but it didn't help.


Posted By: the boss
Date Posted: 14 July 2003 at 3:29pm
Originally posted by zMaestro zMaestro wrote:

This is really NOT FUNNY AT ALL

It is not going to be a forum this way, PLEASE STOP THIS NONSENSE

what nonsense???



-------------
http://www.web2messenger.com/theboss">


Posted By: BOB1
Date Posted: 17 July 2003 at 5:02pm

up

help plz...




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net