I have this table in HTML:
<table style="width: 100%;" class="allBorders">
<tbody id="added_articles">
<tr id="header_articles">
<td>test</td>
<td> </td>
</tr>
</tbody>
</table>
And using XAJAX I append new ROW like THIS
function addNewLine()
{
global $objResponse;
$uniqueID = time();
$return = "<tr id='articles_".$uniqueID."'>";
$return .= "<td><input type='text' id='v_$uniqueID' name='v[]' /></td>";
$return .= "</tr>";
$objResponse->append("added_articles", "innerHTML", $return);
return $objResponse;
}
Whenever I add new line all values in previously added lines are cleared..
Example:
Any idea?
<div id="added_articles">
<table style="width: 100%;" class="allBorders">
<tbody>
<tr id="header_articles">
<td>test</td>
<td> </td>`enter code here`
</tr>
</tbody>
</table>
</div>
function addNewLine()
{
global $objResponse;
$return .= "<table style="width: 100%;" class="allBorders">";
$return .= "<tr id='articles_".$uniqueID."'>";
$return .= "<td><input type='text' id='v_$uniqueID' name='v[]' /></td>";
$return .= "</tr></table>";
$objResponse->append("added_articles", "innerHTML", $return);
return $objResponse;
}