Saturday, July 8, 2017

Add onchange event to dropdown list



<label class="control-label">Parlimen</label><br />

<?php
echo dropDownList("id_parlimen", "id_parlimen", "", "parlimen", "kod_parlimen", "parlimen", $kodParlimen, "id_negeri=".$id_negeri, "parlimen","query_data_dun('maklumat/include/get_dun.php','id_dun')");
?>

<!-- To add onchange event to id_parlimen dropdown list -->
<script type="text/javascript">
 $("#id_parlimen").on("change", function(event) {
  query_data_dun('maklumat/include/get_dun.php','id_dun');
 } );
</script>

No comments:

Post a Comment