tags:

views:

46

answers:

1

Hi,

There is a table that the data is being loaded dynamically in to it using Jtemplate. After I right click on a row and click on edit the entire row should go to the edit mode and the cells should contain dropdowns,text,date fields etc.as well it should display save and cancel buttons onclick of edit. after clicking on save the change data should go to the database using ajax. Hope you have suggestions for this.

thanks, abc

+1  A: 

You cannot expect much help based on the information you provided. But I will give you a small example

HTML

<div id="mytext">Your name loaded from database</div>
<a class="triggeredit" href="javascript:void();">Edit</a>

Script

$(function() {
   $(".triggeredit").click(function() {
       var thetext = $('#mytext').html();
       $("#mytext").html('<input type="text" name="edittext" id="edittext" value="'+thetext+'" />');
   });
});
Starx