W3C home > Mailing lists > Public > www-amaya@w3.org > April to June 2006

<script> gets deleted

From: Keith Rubow <keith.microaide@earthlink.net>
Date: Mon, 01 May 2006 16:23:18 -0700
Message-ID: <44569866.9000306@earthlink.net>
To: www-amaya@w3.org

I am running Amaya 9.51 on Windows XP. I have some HTML pages that use 
the Javascript document.write() function to generate rows in a table. My 
page looks something like this:

<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 4.01 Transitional//EN">
<html>
<head>
   ...
   <script type="text/javascript">
     function makerow(arguments...) {
// code to generate a row in table, <tr> <td>text</td> ... </tr>
       document.write(...)
     }
   </script>
</head>
<body>
   <table>
     <tbody>
       <tr> (first table row is in plain html)
         <td>text1</td>
         <td>text2</td>
         <td>text3</td>
       </tr>
       <script type=text/javascript">
         makerow(...) (more table rows are generated via javascript)
         makerow(...)
         ...
         makerow(...)
       </script>
     </tbody>
   </table>
</body>
</html>

The problem is that when I read this page into Amaya, then save the 
file, everything inside the table from the <script> to the </script> is 
deleted!

This page (as above) renders perfectly in Netscape, Firefox, and 
Micro$oft Internet Explorer. However, Amaya does not seem to like a 
<script> inside the table. Javascript allows me to generate any document 
content, including table rows, using document.write(). Why doesn't Amaya 
allow <script> inside <table>?

Note that my actual table is much more complicated than the example 
above. My javascript generated table rows have cells containing text, 
hyperlinks, and even forms with buttons. Generating the rows with 
javascript is at least twenty times easier than coding up each row 
individually.

Keith Rubow
Received on Monday, 1 May 2006 23:24:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 20 September 2007 14:24:43 GMT