stevenj_3
03-11-2002, 11:54 AM
Can somebody explain to me why this script doesn't render anything some of the time. When I close and restart the browser it works fine but sometimes when the browser has been open for a significant length of time (~1 hour) nothing shows up when I try to view it. Here is the code. I would appreciate any help you could provide. Thanks.
<html>
<head>
<style type="text/css">
<!--
.thumb {font-family: verdana, arial, helvetica; font-size: 10px; color: #3D78FD}
body {background-color: #0D0F30}
-->
</style>
<script>
function printIcons()
{
var icons = new Array();
icons[0] = 'tn1|';
icons[1] = 'tn2|';
icons[2] = 'tn3|';
icons[3] = 'tn4|';
icons[4] = 'tn1|';
icons[5] = 'tn2|';
icons[6] = 'tn3|';
icons[7] = 'tn4|';
icons[8] = 'tn1|';
icons[9] = 'tn2|';
icons[10] = 'tn3|';
icons[11] = 'tn4|';
icons[12] = 'tn1|';
icons[13] = 'tn2|';
icons[14] = 'tn3|';
icons[15] = 'tn4|';
var DELIMITER = '|';
var printOut = '';
name = name.toLowerCase();
for (var count = 0; count < icons.length; count++)
{
var endName = icons[count].indexOf(DELIMITER, + 1);
var poodle = icons[count].substring(0, endName);
var compareName = '<img src="sampleObj_thumbs/' + poodle + '.jpg" border="0">';
var linkTo = '<table align="left" width="110" cellspacing="0" cellpadding="0" border="0"><tr><td width="110" height="64" valign="middle" align="center"><A HREF=# onClick=parent.frames[3].mainImage.src="bigPics/' + poodle + '.jpg";parent.frames[4].location.href="articles/' + poodle + '.html">';
if (compareName.toLowerCase().indexOf(name) != -1)
printOut += ''+ linkTo + compareName+'</A></td><TD rowspan="3" BGCOLOR="#1C3172" WIDTH="1" HEIGHT="1"><SPACER TYPE="BLOCK" WIDTH="1" HEIGHT="1"></TD></tr><tr><TD HEIGHT="5"><SPACER TYPE="BLOCK" HEIGHT="5"></TD> </tr><tr><td valign="top" align="center"><font face="verdana" color="#3D78FD" size="-2">'+poodle+'</font></td></tr></table>';
}
showIcons= printOut
document.write(showIcons);
}
</script>
</head>
<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
<script>printIcons()</script>
</body>
</html>
<html>
<head>
<style type="text/css">
<!--
.thumb {font-family: verdana, arial, helvetica; font-size: 10px; color: #3D78FD}
body {background-color: #0D0F30}
-->
</style>
<script>
function printIcons()
{
var icons = new Array();
icons[0] = 'tn1|';
icons[1] = 'tn2|';
icons[2] = 'tn3|';
icons[3] = 'tn4|';
icons[4] = 'tn1|';
icons[5] = 'tn2|';
icons[6] = 'tn3|';
icons[7] = 'tn4|';
icons[8] = 'tn1|';
icons[9] = 'tn2|';
icons[10] = 'tn3|';
icons[11] = 'tn4|';
icons[12] = 'tn1|';
icons[13] = 'tn2|';
icons[14] = 'tn3|';
icons[15] = 'tn4|';
var DELIMITER = '|';
var printOut = '';
name = name.toLowerCase();
for (var count = 0; count < icons.length; count++)
{
var endName = icons[count].indexOf(DELIMITER, + 1);
var poodle = icons[count].substring(0, endName);
var compareName = '<img src="sampleObj_thumbs/' + poodle + '.jpg" border="0">';
var linkTo = '<table align="left" width="110" cellspacing="0" cellpadding="0" border="0"><tr><td width="110" height="64" valign="middle" align="center"><A HREF=# onClick=parent.frames[3].mainImage.src="bigPics/' + poodle + '.jpg";parent.frames[4].location.href="articles/' + poodle + '.html">';
if (compareName.toLowerCase().indexOf(name) != -1)
printOut += ''+ linkTo + compareName+'</A></td><TD rowspan="3" BGCOLOR="#1C3172" WIDTH="1" HEIGHT="1"><SPACER TYPE="BLOCK" WIDTH="1" HEIGHT="1"></TD></tr><tr><TD HEIGHT="5"><SPACER TYPE="BLOCK" HEIGHT="5"></TD> </tr><tr><td valign="top" align="center"><font face="verdana" color="#3D78FD" size="-2">'+poodle+'</font></td></tr></table>';
}
showIcons= printOut
document.write(showIcons);
}
</script>
</head>
<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
<script>printIcons()</script>
</body>
</html>