Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Funky Remove 1

Status
Not open for further replies.

Csanad

Programmer
Jul 25, 2007
23
0
0
US
Hi,

Here's my form - it's still work in progress, but I got stuck with the Remove Item option.


Here's my dilemma:

As long as I don't remove the very first Item, everything works as expected, i.e. I can add Dependant Items. But if I remove the first Item and add a Another Item, then the "Add a Dependant Item" button will not work.

Any ideas?

Thank you!

Csanád
 
I've done something similar in the past, and the easiest solution is always to stop people from delivering the first item.

If this is not an option, how about you test whether it's the first item... and if it is, update the pointer to the node(s) you are going to clone so that they point to the second item in the list. Something like that. This could require making the pointer to the node(s) global.

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Thanks BabyJeffy! It's fixed. I posted another thread in the HTML, XHTML & CSS Forum in case you're interested. Subject: "Funky Remove - Take 2."

Thanks again.

Csanád
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top