The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I fire this from an onchange event from a select box, this works to an extend in so far that every time i change the select box it adds the required number of rows to the table.
My question is though, everytime the onchange event fires I want to remove the previous number of rows from the table. For instance I initaly select 3 rows to be inserted and change my mind to 2 how do i remove the first 3 rows before I add 2?

There are a couple of ways, perhaps an option would be to set a cookie of the elements in the table, check the cookie and then update accordingly, alternativly you might want to set an attribute in the TR somewhere that you can read and destroy if it doesnt match the request of the new onchage.

Dont know if that helps any

My postings are a natural product.
The slight variations in spelling and grammar enhance its
individual character and beauty and in no way are to be
considered flaws or defects - http://www.guinnesspig.net

There are a couple of ways, perhaps an option would be to set a cookie of the elements in the table, check the cookie and then update accordingly, alternativly you might want to set an attribute in the TR somewhere that you can read and destroy if it doesnt match the request of the new onchage.

Dont know if that helps any

it does help thanks, have you any sample code I could have a peek at to see how its done.