Hi, I am very new to jQuery,here I need to add/remove a set of - TopicsExpress



          

Hi, I am very new to jQuery,here I need to add/remove a set of textbox and select box in a row by clicking a button. While Adding i have to populate the same select box with options. i have achieved add and remove by the following code. ============Add================= var i = 1; $(#add).click(function() { i++; $(.normal-tble tbody tr:first).clone().find(select,input).each(function() { var tempId = $(this).attr(id); $(this).attr(id,$(this).attr(id)+_+(i)) var newID = $(this).attr(id); if(tempId==category) { getCategory(operId,numID,newID); } }).end().appendTo(table); }); =============Remove=============== $(table.normal-tble).on(click, #remove, function (event) { $(this).closest(tr).remove(); i -= 1 }); ================code appending=================== ==================Fetch Data================= $(this).change(function() { var value = $(this).val(); }); }); =================================== Based on First select box change i have to populate values in other select boxes and text box. 1.How can I get the value of first select box when onchange ?, because i need to populate the other two select box based on this value. 2.how to get the values of all select/textbox while submit.? Please help me.
Posted on: Tue, 23 Dec 2014 20:47:51 +0000

Trending Topics



Recently Viewed Topics




© 2015