1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| <script type="text/javascript">
$(function(){
var planningcycle='<?php echo $planningcycle;?>';
//var country='<?php echo $country;?>';
var country=$("#countryselect").val();
var cube='<?php echo $cube;?>';
$.ajax({
url: 'treatment.php',
data: {pc: planningcycle,
country: country,
cube: cube
},
dataType: 'json',
success: function(json) {
currentstat=json['current_status'];
$("#current_status").text(currentstat);
}
});
$("#countryselect").change(function(){
var planningcycle='<?php echo $planningcycle;?>';
//var country='<?php echo $country;?>';
var country=$("#countryselect").val();
var cube='<?php echo $cube;?>';
$.ajax({
url: 'treatment.php',
data: {pc: planningcycle,
country: country,
cube: cube
},
dataType: 'json',
success: function(json) {
currentstat=json['current_status'];
$("#current_status").text(currentstat);
}
});
});
});
</script>
</head>
<body>
<div id="current_status"></div>
<select id="countryselect">
<option value="LPFI">LPFI</option>
<option value="LPFR">LPFR</option>
<option value="LPDE">LPDE</option>
</select>
</body>
</html> |