Search the Community
Showing results for tags 'append'.
-
Hi Here is my problem https://jsfiddle.net/mphur5eq/14/ I have two tables on the left section1 on top and section2 at the bottom each section has its own button to insert row section 1 has different number of fields than that on section 2. the problem is when i clicked on New Row on section 2 it clones the row from section 1 which is wrong, it should clone the row of the section where it belongs. can you help me with this? Thank you
-
hi mate its me again asking questions on jquery clone. As solved before, i have a form that contains rows that is being cloned. (works perfect). Make a Copy of that form to the right side (Works great) here is my problem, when i make a copy of that form to the right the click event is lost on the New Row button to the form on the right. can you help me with this? Here is a working jsfiddle: https://jsfiddle.net/mphur5eq/5/
-
Hello Mate, I have another question with clone or append. I have two div's containing form with tables in between of the divs is "Copy" button. Now, When i click on Copy, what ever is on the left side form will be copied to the right side form... so basically im confused on what to use or how to implement. Thank you in advance.,
-
Trying to simply append each error message into the error.message div. We can get only one of the error messages at time to display in notification div. We just want each field with error to display in notification div. Can anyone give some direction, we mssing: Error Message loop if((data.row_id).length > 0) { $.each(data, function(error_code, message ) { if(errorCode == $.trim(data.error_code) && errorCode != -1 ){ error_message = data.message; return false; } }); } Print out Error Message(display) var spanerrorgen = $('.error.message').contents().find('h4').html(error_message); var appenderrorgen = $('.error.message').contents().find('h4'); $($fieldref).each(function(){ $(spanerrorgen).append(appenderrorgen); }); errorFields.notify.showNotification(".error");
-
I have a website with a variable number of inputs in various categories. I want to allow the user to add rows to the table with the input lines in every category. The table looks like this: <tr><th>Working Capital Changes</th></tr><tr><td><input type="hidden" name="category_code[]" value="WORK"><input type="text" name="description[]" value="Increase (decrease) in working capital" size="60"></td> <td><input type="text" name="amount[1][]" value="" onblur="this.value = formatNumber2Comma(this.value);" ></td></tr> <tr><td><input type="hidden" name="category_code[]" value="WORK"><input type="text" name="description[]" value="" size="60"></td> <td><input type="text" name="amount[1][]" onblur="this.value = formatNumber2Comma(this.value);" ></td></tr> <tr><th>Depreciation and Amortization</th></tr><tr><td><input type="hidden" name="category_code[]" value="DEPR"><input type="text" name="description[]" value="Depreciation and Amortization (for taxes)" size="60"></td> <td><input type="text" name="amount[1][]" value="" onblur="this.value = formatNumber2Comma(this.value);" ></td></tr> <tr><td><input type="hidden" name="category_code[]" value="DEPR"><input type="text" name="description[]" value="" size="60"></td><td><input type="text" name="amount[1][]" onblur="this.value = formatNumber2Comma(this.value);" ></td></tr> I tried adding the following near the top of the page: <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> var count = 0; $(function(){ alert ('wow'); $('tr#add_field').click(function(){ alert ('whee'); count += 1; $('#container').append('<table><tr><td><input id="field_' + count + 'type="hidden" name="category_code[]" value="DEPR"><input type="text" name="description[]" value="" size="60"></td><td><input type="text" name="amount[1][]" onblur="this.value = formatNumber2Comma(this.value);" ></td></tr></table>' ); }); }); I get the wow alert on page load and whee when I click the link: <tr id="add_field"><th><a href="#">Click to add another line</a></th></tr> that I added to the bottom of the table before the </table> but I do not get an additional line I have tried moving the add_field line outside of the table and changing the <tr></tr> to a <p></p> but that does not help.
-
hi friends, im trying a case, n i have problem on it, im gonna input multiple data , here sample my form html: <div id="form_name"> <select id="name_emp"> <option value="1234">joko</option> <option value="9900">Rudi</option> <option value="7786">anto</option> </select> <div id="id_emp"> </div> </div> <button id="addBtn">Add Name</button> n i want, for example, a user can show that select elemen above more than 1, so i create jquery code below: $("#addBtn").click(function() { $("#form_name").append('<select id="name_emp"><option value="1234">joko</option><option value="9900">Rudi</option> <option value="7786">anto</option> </select> <div id="id_emp"> </div>'); }); so, if a user click Add Name button, the select elemen wil show again. after a user choose from select elemen, i want jquery show the ID, example, if i choose joko, ID will show 1234 n so forth. so i create jquery code below: $('#name_emp').change(function() { var ID = $("#name_emp").val(); $('#id_emp').html(ID); }); it works when i choose the name n the ID is out between <div id="id_emp"></div> at first time, but, when i click Add Name button to show again the select elemen, n i choose employee name, the ID is not out,that's my problem friends, can you help me? thanks before....