Forum Moderators: open
I have the following javascript that checks and displays the version of windows media player:
<OBJECT classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 codeBase=#Version=6,4,5,715 height=1 id=WMP64 width=1></OBJECT>
<OBJECT classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 codeBase=#Version=7,0,0,1954 height=1 id=WMP7 width=1></OBJECT>
<SCRIPT language=VBScript>
<!--
On error resume next
WB_DWM52 = (IsObject(CreateObject("MediaPlayer.MediaPlayer.1") ) )
WB_DWM64 = (WMP64.FileName="")
WB_DWM79 = WMP7.versionInfo
//-->
</SCRIPT>
<SCRIPT language=JavaScript>
var WB_WM="undefined";
if (document.all) {
if( WB_DWM79 ) {WB_WM=WB_DWM79.slice(0,3);}
else if( WB_DWM64 ) {WB_WM="6.4";}
else if( WB_DWM52 ) {WB_WM="5.2";}
else {WB_WM="undefined";}
document.write('Installed Windows Media Player Version: <b>' + WB_WM + '</b>');
}
</SCRIPT>
the problem is that if i dont have windows media 9 installed it doesnt execute the line that reads the following:
document.write('Installed Windows Media Player Version: <b>' + WB_WM + '</b>');
I want the script to display another message if they dont ahve the minimum version.
Can anyone please tell me how i can do this.
Many thanx in advance.