PDA

Click to See Complete Forum and Search --> : Edit Cells


joey o.
Oct 11th, 2000, 12:51 PM
Let's say I've got this table already produced by a database query:
<table border>
<tr>
<td>Data Text1
<td>Data Text2
<td>Data Text3
<tr>
<td>Data Text1A
<td>Data Text2A
<td>Data Text3A
</tr>
</table>

How do I make these cells editable so I can call some more ASP which will append the text to the existing data so the next time I see the table Text1,2,3,1A... is now "Text1 and stuff I added", "Text2 and stuff I added after adding to Text1"... I don't want to use any controls.

monte96
Oct 11th, 2000, 03:27 PM
You will need to create INPUT tags and place your database text into the value attribute of the INPUT tag. Then the text is editable in a textbox. You can then get the values from the textboxes and update the database.

Also, you need to close your td and tr blocks.

Try this instead:


<table border=1>
<tr>
<td><input id=data1 value=Data Text1></td>
<td><input id=data2 value=Data Text2></td>
<td><input id=data3 value=Data Text3></td>
</tr>
<tr>
<td><input id=data1A value=Data Text1A></td>
<td><input id=data2A value=Data Text2A></td>
<td><input id=data3A value=Data Text3A></td>
</tr>
</table>