Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript in netscape table causes gaps

    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!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    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().


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •