Q
Qiang Lin
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="#FFFFFF">
<script language="Javascript" type="text/javascript">
<!-- Hide script from older browsers
if (navigator.plugins && navigator.plugins.length > 0) {
document.write("You have the following plugins: <table cellspacing='4'
cellpadding='4'>")
document.write("<tr><th bgcolor='#CCCCCC'>Name<\/th><th
bgcolor='#CCCCCC'>Filename<\/th><th
bgcolor='#CCCCCC'>Description<\/th><\/tr>")
for (i=0; i<navigator.plugins.length; i++) {
thisPlugin = navigator.plugins
document.write("<tr valign='top'><td bgcolor='#CCCCCC'>" +
thisPlugin.name)
document.write("<\/td><td bgcolor='#CCCCCC'>" + thisPlugin.filename)
document.write("<\/td><td bgcolor='#CCCCCC'>" + thisPlugin.description +
"<\/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="#FFFFFF">
<script language="Javascript" type="text/javascript">
<!-- Hide script from older browsers
if (navigator.plugins && navigator.plugins.length > 0) {
document.write("You have the following plugins: <table cellspacing='4'
cellpadding='4'>")
document.write("<tr><th bgcolor='#CCCCCC'>Name<\/th><th
bgcolor='#CCCCCC'>Filename<\/th><th
bgcolor='#CCCCCC'>Description<\/th><\/tr>")
for (i=0; i<navigator.plugins.length; i++) {
thisPlugin = navigator.plugins
document.write("<tr valign='top'><td bgcolor='#CCCCCC'>" +
thisPlugin.name)
document.write("<\/td><td bgcolor='#CCCCCC'>" + thisPlugin.filename)
document.write("<\/td><td bgcolor='#CCCCCC'>" + thisPlugin.description +
"<\/td><\/tr>")
}
document.write("<\/table>")
}
else {
document.write("JavaScript couldn't find any plugins")
}
// End hiding script from older browsers -->
</script>
</body>
</html>
------------------------------------------