Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Table containing Javascript to build cells
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
P E Schoen  
View profile  
 More options Jan 11 2011, 8:04 pm
Newsgroups: alt.html
From: "P E Schoen" <p...@pstech-inc.com>
Date: Tue, 11 Jan 2011 20:04:25 -0500
Local: Tues, Jan 11 2011 8:04 pm
Subject: Table containing Javascript to build cells
I have a table which is filled with name, title, email, and phone numbers.
To make it easier to maintain I create a script which adds the rows and
items from an array. It works fine but according to the HTML 4.01
transitional validator the script is not allowed there.

            <div align="center"><h1 style="font-size:
12pt;">Contacts</h1></div>
            <table cellpadding="2" cellspacing="2" border="2"
style="text-align: left; width: 342px; ">
              <tbody>
                <tr>
                  <td width="231" style="vertical-align: top;"><b>Name</b>
</td>
                  <td width="89" style="vertical-align: top;"><b>Phone
Number</b><br>
                  </td>
                </tr>
        <script language="JavaScript" src="contacts.js"
type="text/javascript"> </script>
              </tbody>
            </table>

The script is:

    var contact = new Array();

    contact[0] = ["Name0", "Title0", "mailto:ema...@null.null",
"000-555-5555"];
    ...
    contact[17]

    for (i=0; i<=17; i++) {
      document.write( "<tr><td ><p><b>" + contact[i][0] + "</b><Br>\n");
      document.write( contact[i][1] + "<br>\n");
      document.write( "<a href='" + contact[i][2] + "'>Email</a></td>\n");
      document.write( "<td style='vertical-align: top;'><br>\n");
      document.write( contact[i][3] + "<br> </td> </tr>\n");
    }

I can probably construct the entire table with the script. I did not see any
information about script not allowed within a table. I referred to
http://www.w3.org/TR/html4/interact/scripts.html

Thanks,

Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.