02.
<
script
>
03.
$('document').ready(function ()
04.
{
05.
$('#unit_select').change(function ()
06.
{
07.
//alert($(this).val());
08.
if ($(this).val() != '')
09.
{
10.
$('#result').html('');
11.
} else {
12.
$('#result').html('');
13.
}
14.
});
15.
16.
});
17.
</
script
>
18.
19.
<
select
id
=
"unit_select"
name
=
"unit_select"
size="<? $count_unit; ?>">
20.
<
option
value
=
""
><-- Please Select Item --></
option
>
21.
<?
22.
$sql2 = "SELECT * FROM tb_unit WHERE tb_unit.sub_id = $sublearn";
23.
$query2 = mysql_query($sql2);
24.
while($result2 = mysql_fetch_array($query2))
25.
{
26.
?>
27.
<
option
value
=
"<?=$result2["
unit_id"];?>"><?=$result2["unit_id"]." - ".$result2["unit_name"];?></
option
>
28.
<?
29.
}
30.
?>
31.
</
select
>
32.
33.
<
div
id
=
"result"
></
div
>