W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2000

RE: Over-tidying <TR>'s

From: Stuart Updegrave <supde@microsoft.com>
Date: Mon, 17 Jan 2000 16:15:12 -0800
Message-ID: <5B3F16B2DB67D1119A0D00805F312AA214980149@RED-MSG-58>
To: "'susan_levine@peoplesoft.com'" <susan_levine@peoplesoft.com>, html-tidy@w3.org
Cc: ac.quick@sympatico.ca
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT