Jump to content
Sign in to follow this  

Problem getting clone section to work

Recommended Posts


Here is my problem


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

Edited by neilfurry

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.