cloneNode() - Cloning Existing Form Objects
- Introduction

- Introduction
- Assigning Unique names
- Assigning Unique ids
- Retaining Values and Object States

for IE5.5+, N7+, and Mozilla 1.1

Several people have contacted me this year ( 2003 ) with questions about using cloneNode() with existing form objects. While each person had a different objective, all the questions started with the same scenario: cloning a table row that contains form elements, adding the new row to the table, and doing one or more of the following:

What we found is that there are many problems associated with cloning form elements. It's best used within a controlled intranet environment as long as you're aware of the support limitiations of the target browser. You can't expect any kind of consistent cross-browser support.

! SOLUTION ALERT !

Dave Chisholm has developed a great script that lets cloned form objects retain all the attributes and event handlers of the originals. You can see the form in action at http://www.receptiveearth.com

Assigning Unique names >>








PXL8 2003