View Full Version : add rows on users input

01-18-2006, 06:46 AM
Hi everyone,
This seems like I'm crazy about JavaScript coz I'm always up with a question. A few hours ago I had raised a question regarding "listmenu" and I got my share :) . Thanks to all for sharing their wisdom.

My question here is: How do I add/ delete rows on users input? I have a textbox for users to input the no. of rows they want. Initially there are 3 rows shown with a value "3" in the textbox.

If a user inserts "4" in the textbox then one more row will be added next to the third row and so on. And If a user inserts "2" then the third row will be deleted and so on.

Any solution there?



01-18-2006, 06:57 AM
Did Bill Posters already address this problem here (http://www.codingforums.com/showthread.php?t=76040)?
He already gave you a link to a tutorial on how to add/delete HTML table row that contains fields.
You already got the base script, you just need to add that input number of rows thingy.