3D_Dog_Man
05-03-2004, 03:10 AM
Hi All,
I have written a script which displays some MIME type information. Part of the information is displayed in a table... however the table renders in the most bizarre fashion, with various rows spaced all over the place. I have included the code below (this only works in Netscape or Mozilla ---> not IE). Could somebody please explain why the tables are not behaving ideally (symetrically)? Also does anybody know why this code won't work in IE?
<html>
<head>
<title>Checking for present MIME types using JavaScript</title>
<script type="text/javascript">
<!--
function showProperties()
{
var property;
for(property in navigator)
{
document.writeln(navigator[property] + '<br>');
}
}
function showMIMETypes()
{
for(i=0; i<navigator.mimeTypes.length; i++)
{
document.write('<table width="100%" border="1">');
document.write('<tr><td>Type: </td><td>' + navigator.mimeTypes[i].type + '</td></tr>');
document.write('<tr><td>Description: </td><td>' + navigator.mimeTypes[i].description + '</td></tr>');
document.write('<tr><td>Plugin: </td><td>' + navigator.mimeTypes[i].enabledPlugin + '</td></tr>');
document.write('</table>');
document.write('<br>');
}
}
function showPlugIns()
{
for(i=0; i<navigator.plugins.length; i++)
{
document.writeln(navigator.plugins[i].name + '<br');
document.writeln(navigator.plugins[i].description + '<br');
document.writeln(navigator.plugins[i].filename + '<br');
document.writeln(navigator.plugins[i].length + '<br');
document.writeln('<br>');
}
}
//-->
</script>
</head>
<body>
<h1>This Browsers Navigator Object Properties Are</h1><br>
<script>showProperties();</script>
<h1>The Valid MIME Types Accepted By This Browser Are</h1><br>
<script>showMIMETypes();</script>
<h1>The Valid Plugins Associated With This Browser Are</h1><br>
<script>showPlugIns();</script>
</body>
</html>
Thanks
Regards
David
I have written a script which displays some MIME type information. Part of the information is displayed in a table... however the table renders in the most bizarre fashion, with various rows spaced all over the place. I have included the code below (this only works in Netscape or Mozilla ---> not IE). Could somebody please explain why the tables are not behaving ideally (symetrically)? Also does anybody know why this code won't work in IE?
<html>
<head>
<title>Checking for present MIME types using JavaScript</title>
<script type="text/javascript">
<!--
function showProperties()
{
var property;
for(property in navigator)
{
document.writeln(navigator[property] + '<br>');
}
}
function showMIMETypes()
{
for(i=0; i<navigator.mimeTypes.length; i++)
{
document.write('<table width="100%" border="1">');
document.write('<tr><td>Type: </td><td>' + navigator.mimeTypes[i].type + '</td></tr>');
document.write('<tr><td>Description: </td><td>' + navigator.mimeTypes[i].description + '</td></tr>');
document.write('<tr><td>Plugin: </td><td>' + navigator.mimeTypes[i].enabledPlugin + '</td></tr>');
document.write('</table>');
document.write('<br>');
}
}
function showPlugIns()
{
for(i=0; i<navigator.plugins.length; i++)
{
document.writeln(navigator.plugins[i].name + '<br');
document.writeln(navigator.plugins[i].description + '<br');
document.writeln(navigator.plugins[i].filename + '<br');
document.writeln(navigator.plugins[i].length + '<br');
document.writeln('<br>');
}
}
//-->
</script>
</head>
<body>
<h1>This Browsers Navigator Object Properties Are</h1><br>
<script>showProperties();</script>
<h1>The Valid MIME Types Accepted By This Browser Are</h1><br>
<script>showMIMETypes();</script>
<h1>The Valid Plugins Associated With This Browser Are</h1><br>
<script>showPlugIns();</script>
</body>
</html>
Thanks
Regards
David