Example 1:
<script type="text/JavaScript">
function getTime(){
var ClassDivision = document.getElementById("Class").value;
var chrType = document.getElementById("Type").value;
$.ajax({
type: "POST",
url: "ajax/ajax_page.php",
data: 'Class='+Class+'&Type='+Type,
cache: false,
success: function(msg){
$("#Name_ID").html(msg);
},
error: function(){
alert('Server Busy');
}
});
}
</script>
Example 2:
<script language="JavaScript" type="text/JavaScript">
$(document).ready(function () {
$('#intBuilding').change(function(e){
var classid=$(this).val();
$('#RoomNo').load('ajax/ajax_rooms.php?id='+classid);
});
});
</script>
No comments:
Post a Comment