I've since changed the code on my sample page, but I found an odd bug in
jQuery using a combination of clone() and appendTo() that I wanted to put
out there.

I had a table with 4 columns that I was using for a form entry. Then I
created a "template" row that was hidden. When the use entered data from the
form, I then cloned the template row, appended it to the original form/table
and filled the data in getting the values from the form.

It looked something like this (before).

<table cellpadding="0" cellspacing="0" border="0">
<tr id="content">
        <td>input field</td>
        <td>input field</td>
        <td>input field</td>
        <td><input type="submit" id="clickme"></td>
</tr>
<tr id="template" class="hidden">
        <td>input field</td>
        <td>input field</td>
        <td>input field</td>
        <td>submit button</td>
</tr>
</table>

When I "Viewed Generated Source" in Firefox (because it wasn't displaying
properly), I found the code looked like this. Notice that the closing TR tag
on the content row is missing.

<table cellpadding="0" cellspacing="0" border="0">
<tr id="content">
        <td>input field</td>
        <td>input field</td>
        <td>input field</td>
        <td><input type="submit" id="clickme"></td>
<tr id="1">
        <td>content from input field</td>
        <td>content from input field</td>
        <td>content from input field</td>
        <td><input type="submit" id="clickme"></td>
</tr>

<tr id="template" class="hidden">
        <td>input field</td>
        <td>input field</td>
        <td>input field</td>
        <td>submit button</td>
</tr>
</table>


<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to