[eluser]dinda[/eluser]
i all,
i wanna auto show child data without refresh whole page using jquery, and i don't know the javascript, any body can help me please.
View : parent.php
Code:
<!-- Show Parent Data -->
<table class="table">
<thead>
<tr>
<th width="30">ParentID</th>
<th width="343">ParentDesc</th>
<th width="343">Refresh Child Data with this Parent ID</th>
</tr>
</thead>
<tbody>
<?php foreach($parentresults->result() as $parent): ?>
<tr>
<td><?=$parent->parentid?></td>
<td><?=$parent->parentdesc?></td>
<td><?=anchor('parent/show_child/'.$parent->parentid, 'View this Child with ajax')?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<br>
<!-- Show Child Data -->
<table class="table">
<thead>
<tr>
<th width="30">ParentID</th>
<th width="30">ChildID</th>
<th width="343">ChildDesc</th>
</tr>
</thead>
<tbody>
<?php foreach($childresults->result() as $child): ?>
<tr>
<td><?=$child->parentid?></td>
<td><?=$child->childid?></td>
<td><?=$child->childdesc?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
thanks.