Hi,
I am running a script to find out the plug-ins installed in my pc. I run the
same script both in IE 6.0 and Netcape 7.1, but I got different results. IE
says "JavaScript couldn't find any plugins", and Netcape returns a table
listing all plug-ins. Can anyone tell me why this happens? Thanks!
---------------------------the script-----------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>What are my plugins?</title>
</head>
<body bgcolor="#FFFFF F">
<script language="Javas cript" type="text/javascript">
<!-- Hide script from older browsers
if (navigator.plug ins && navigator.plugi ns.length > 0) {
document.write( "You have the following plugins: <table cellspacing='4'
cellpadding='4' >")
document.write( "<tr><th bgcolor='#CCCCC C'>Name<\/th><th
bgcolor='#CCCCC C'>Filename<\/th><th
bgcolor='#CCCCC C'>Description< \/th><\/tr>")
for (i=0; i<navigator.plu gins.length; i++) {
thisPlugin = navigator.plugi ns[i]
document.write( "<tr valign='top'><t d bgcolor='#CCCCC C'>" +
thisPlugin.name )
document.write( "<\/td><td bgcolor='#CCCCC C'>" + thisPlugin.file name)
document.write( "<\/td><td bgcolor='#CCCCC C'>" + thisPlugin.desc ription +
"<\/td><\/tr>")
}
document.write( "<\/table>")
}
else {
document.write( "JavaScript couldn't find any plugins")
}
// End hiding script from older browsers -->
</script>
</body>
</html>
------------------------------------------
I am running a script to find out the plug-ins installed in my pc. I run the
same script both in IE 6.0 and Netcape 7.1, but I got different results. IE
says "JavaScript couldn't find any plugins", and Netcape returns a table
listing all plug-ins. Can anyone tell me why this happens? Thanks!
---------------------------the script-----------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>What are my plugins?</title>
</head>
<body bgcolor="#FFFFF F">
<script language="Javas cript" type="text/javascript">
<!-- Hide script from older browsers
if (navigator.plug ins && navigator.plugi ns.length > 0) {
document.write( "You have the following plugins: <table cellspacing='4'
cellpadding='4' >")
document.write( "<tr><th bgcolor='#CCCCC C'>Name<\/th><th
bgcolor='#CCCCC C'>Filename<\/th><th
bgcolor='#CCCCC C'>Description< \/th><\/tr>")
for (i=0; i<navigator.plu gins.length; i++) {
thisPlugin = navigator.plugi ns[i]
document.write( "<tr valign='top'><t d bgcolor='#CCCCC C'>" +
thisPlugin.name )
document.write( "<\/td><td bgcolor='#CCCCC C'>" + thisPlugin.file name)
document.write( "<\/td><td bgcolor='#CCCCC C'>" + thisPlugin.desc ription +
"<\/td><\/tr>")
}
document.write( "<\/table>")
}
else {
document.write( "JavaScript couldn't find any plugins")
}
// End hiding script from older browsers -->
</script>
</body>
</html>
------------------------------------------
Comment