cptjs.html 560 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<script language="javascript">

function updateCpt() {
   $.ajax({
       type: "GET",
       url: "/cpt.xml",
       dataType: "xml",
       success: function(xml) {
         var CptDate = $(xml).find("date").text();
			var CptDays = $(xml).find("days").text();
			var CptDams = $(xml).find("dams").text();
			var CptPeople = $(xml).find("people").text();
			$("#cptdays").text(CptDays);
			$("#cptcitizen").text(CptPeople+"%");
			$("#cptdams").text(CptDams+"%");
		   $("#cpt0day").text(CptDate);	
		}
   });
};

$(document).ready(updateCpt());

</script>