I am not sure whether I am asking a dumb question again or not but because I am really a newbie in javascript and php so do hope that someone can help me out on this.
The problem I am facing now is I now have a PHP array named "$horse_info" which consists of all info of horses. Now I will like to display selected horse info once at a time. I was told to use javascript so that it does not need to query from server each time. But how should I do that?
Here is my code and output:
<td> Horse </td>
<td colspan=2>
<select onChange='goto(this.options[this.selectedIndex].value)'>
<?php foreach ($horse_info as $h_list) { ?>
<option<?php if($h_list->HID==$horse_id){?> selected ="selected"<?php } ?>><?php echo $h_list->HNAME;?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td> Date Last Meeting </td>
<td colspan= 2> </td> <!-- this is where I will need to show last meeting of each horse once at a time. -->