Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - what is wrong with that script?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

what is wrong with that script?

 Post Reply Post Reply Page  12>
Author
BOB1 View Drop Down
Senior Member
Senior Member


Joined: 12 October 2002
Location: Israel
Status: Offline
Points: 395
Post Options Post Options   Thanks (0) Thanks(0)   Quote BOB1 Quote  Post ReplyReply Direct Link To This Post Topic: what is wrong with that script?
    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



Edited by BOB1
Back to Top
dead_angel View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 02 May 2003
Location: United Kingdom
Status: Offline
Points: 147
Post Options Post Options   Thanks (0) Thanks(0)   Quote dead_angel Quote  Post ReplyReply Direct Link To This Post 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..
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2003 at 5:14pm
try spelling 'lenght' correctly
Back to Top
BOB1 View Drop Down
Senior Member
Senior Member


Joined: 12 October 2002
Location: Israel
Status: Offline
Points: 395
Post Options Post Options   Thanks (0) Thanks(0)   Quote BOB1 Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2003 at 6:36pm

didn't help ...

Back to Top
BOB1 View Drop Down
Senior Member
Senior Member


Joined: 12 October 2002
Location: Israel
Status: Offline
Points: 395
Post Options Post Options   Thanks (0) Thanks(0)   Quote BOB1 Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2003 at 10:20am
up?
Back to Top
the boss View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 January 2003
Location: Saudi Arabia
Status: Offline
Points: 1727
Post Options Post Options   Thanks (0) Thanks(0)   Quote the boss Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post 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.


 



Edited by zMaestro
Back to Top
os008 View Drop Down
Newbie
Newbie


Joined: 07 July 2003
Location: Egypt
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote os008 Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2003 at 3:11am

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

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.