RE: Over-tidying <TR>'s

Susan -- I believe that your <script> tag should appear within the <td>.
According to the HTML 4.0 Specification, only TH & TD are valid children of
TR. 

cheers,
~stuart 

-----Original Message-----
From: susan_levine@peoplesoft.com [mailto:susan_levine@peoplesoft.com]
Sent: Monday, January 17, 2000 2:27 PM
To: html-tidy@w3.org
Cc: ac.quick@sympatico.ca
Subject: Over-tidying <TR>'s


Hi Tidy People--


Tidy doesn't like script tags inside a <tr>.  It chooses to move it to
before the <table> tag.  The problem is that my <script> tag references an
image defined above it using the javascript DOM, so that when it's moved to
before the table, it gets an undefined object error when it executes.  I
can't find anything in the HTML spec that specifically prohibits the
<script> tag from living within the <tr> (or any other tag).  I believe my
HTML is correct, and Tidy is providing an unnecessary clean up.

Is this something you can (or would be willing to) fix, or is there some
specification that says script tags can only be defined within the <body>
tag?

I am actually experiencing this problem with the Java version of Tidy, but
Andy Q. does not want to deviate from your functionality.



My HTML looks like this:

<table>
    <tr>
        <td>
            <IMG WIDTH=240 HEIGHT=20 NAME=processing src='IMAGE1.gif'>
        </td>
        <SCRIPT LANGUAGE='javascript'>
          document.processing.src = 'IMAGE2.gif';
        </SCRIPT>

    </tr>
</table>


Tidy makes it look like this:

<script type="text/javascript" language='javascript'>
document.processing.src = 'IMAGE2.gif';

</script>

<table>
    <tr>
     <td>
          <img width="240" height="20" name="processing" src='IMAGE1.gif'>
     </td>
    </tr>
</table>




Thanks in advance,

--Susan
susan_levine@peoplesoft.com

Received on Monday, 17 January 2000 19:18:15 UTC