Tabel Cell

G

gmalai

Hi,

I would like to know if it is possible to add a text box in table cell
if I **double-click** in that particular table cell(the table was
generated at runtime). If so, could you please give some helpful hints
as to how to proceed.

Thanks,

Gayathri
 
G

Guest

Hi,

I had never tried like this but i think it is possible using following way

1. While generating the table also generate the textboxes with visibility
hidden.

2. Generate ID of each cell and its text box in such a way e.g
for table cell say "TD1" for the respective Textbox say "TD1_txt" or
somthing similar

3. Create a javascript function which is called when you double click on the
cell, when you know the cell id, you can easily get an object reference for
text box by using eval function, set its visibility to visible.

4. you can also have another function for hiding inactive textboxes, which
can be called on obblur event of textbox.

5. Once you are done entering the value in the textbox, you can use
innerText property of cell to sync values.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top