- From: Steve Glennie-Smith <sgs@stevegs.com>
- Date: Mon, 21 Jan 2019 21:51:27 +0000
- To: www-validator@w3.org
Received on Tuesday, 22 January 2019 08:27:15 UTC
Hello,
I generally find your verifier very useful. However, it seems to have
problems with tags embedded within JavaScript. It gave an invalid
warning saying a 4-column table row only had 3 elements because the 4th
column was declared within a document.write <script> section. The code
was:
<tr>
<th colspan="3">Tax:
<script>
if (overpaid)
document.write (' overpaid<\/th><td class="red">');
else
document.write (' due<\/th><td class="total">');
var amount = 40.73;
document.write ('£' + amount + '<\/td>');
</script>
</tr>
As you can see, the <th> tag was closed and the 4th column <td> tags
were opened and closed within the script. It seems to be happy that the
<th> tag was closed but didn't 'see' the <td> tags. If I put the
closing </td> tag outside the script, it flagged an error citing a stray
</td> tag.
Regards,
Steve Glennie-Smith
Received on Tuesday, 22 January 2019 08:27:15 UTC