[jQuery] An issue with .clone(true) and IE 6+
Hi everybody,
I'm sorry for my English...
I'm trying to add a new table row (<tr>) after an ajax call.
My code works perfectly with FF or Opera, but not with IE.
With the right browsers I can add multiple row, IE instead overwrite
my first row (with right content but overwrite the last inserted).
This is my code after an ajax call which insert a new record in a DB
table:
function processJson(data) {
// 'data' is the json object returned from the server
$("#responceRow").clone(true).prependTo("#dataTables");
$("#addImage").html('<a href="<?=site_url('admin/settings/
select_typologies_options')?>/'+ data.newId+'"></a>');
$("#responceRow").fadeIn();
$("#newId").html(data.newId);
$("#newName").html(data.newName);
$("#newUrl").html(data.newUrl);
$("#newCreated").html(data.newCreated);
$("#newLastedit").html(data.newLastedit);
$("#newStatus").html(data.newStatus);
}
</script>
[...]
<tr id="responceRow">
<td class="tableCellNew" id="newId"> </td>
<td class="tableCellNew" id="newAdd">
<div id="addImage">
<?='<span>' . $this->lang->line('actionAddDetails') . '</span>'?>
</div>
</td>
<td class="tableCellNew" id="newName"> </td>
<td class="tableCellNew" id="newUrl"> </td>
<td class="tableCellNew" id="newCreated"> </td>
<td class="tableCellNew" id="newLastedit"> </td>
<td class="tableCellNew" id="newStatus"> </td>
<td class="tableCellNew" id="newCheckbox">
<input class="checkbox" type="checkbox" name="toggle[]" />
</td>
</tr>
Have u any idea?
Many Thanks