neilfurry Posted July 6, 2016 Share Posted July 6, 2016 (edited) HiHere is my problemhttps://jsfiddle.net/mphur5eq/14/I have two tables on the left section1 on top and section2 at the bottomeach section has its own button to insert rowsection 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 Edited July 6, 2016 by neilfurry Quote Link to comment https://forums.phpfreaks.com/topic/301434-problem-getting-clone-section-to-work/ Share on other sites More sharing options...
maxxd Posted July 7, 2016 Share Posted July 7, 2016 Your HTML has 4 <tr> elements with an id of 'row', which is wrong from a purely semantic point of view. The point of an id is that (much like Highlander) there can be only one (per page). You've also got 2 'container' ids. You'll find JavaScript and jQuery much easier to deal with if your markup up is syntactically correct, so I'd start looking there. Associate each of the 'new row' buttons with the form by putting the button in the form itself, then you've got a frame within which to work. Quote Link to comment https://forums.phpfreaks.com/topic/301434-problem-getting-clone-section-to-work/#findComment-1534276 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.