...

View Full Version : javascript in netscape table causes gaps



flagrantly76
07-09-2002, 04:25 AM
Hello - this is driving me nuts, so any advice is appreciated. (I'm also new at this, so please bear with me.)

I'm trying to use a random image generator with javascript on my site. The random images themselves are to appear in a carefully laid out table, whose size cannot be altered.

The code for the cell where the images are to appear is:


<TD ROWSPAN=7 WIDTH=59 HEIGHT=170 VALIGN=TOP>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
showImage();
// End -->
</script>

</TD>


In IE it works fine but in Netscape the table breaks apart -- it's like it adds a 5 pixel border to the bottom of the image.

Without the random image generator code, the table looks fine in Netscape -- so why would this cause gaps in the table?

Any help is appreciated!

adios
07-09-2002, 04:44 AM
Just a suggestion: turn off wrap in your editor, and put the <td...>, the <script>.....</script>, and the closing </td> on the same line. Browsers do odd things with whitespace. Hard to say more, without the code which outputs the HTML to the cell. If there are any document.writeln()s in the script, try changing them to document.write().



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum