Add/Remove <span> tag
Posted: Thu Oct 20, 2005 6:49 am
I have a form where users can click a button and more form fields are added by using innerHTML.
I would now like to include a "remove" button incase the user adds too many fields.
I can't remove the fields by referencing them by name, as they all have the same name (date[])
So, i am thinking of wrapping each field in a <span> tag with a unique ID.
Im a little unsure how to go about removing the <span> tag and its contents using Javascript.
Thanks
Mark
I would now like to include a "remove" button incase the user adds too many fields.
I can't remove the fields by referencing them by name, as they all have the same name (date[])
So, i am thinking of wrapping each field in a <span> tag with a unique ID.
Im a little unsure how to go about removing the <span> tag and its contents using Javascript.
Thanks
Mark