Changeset 16738 for schedule/function/function.php
- Timestamp:
- 06/06/13 06:31:20 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/function/function.php
r16721 r16738 22 22 $('#save').click(function(){ 23 23 var dtr; 24 dtr = '<?php echo $_GET['days']; ?>'; 24 dtr = '<?php 25 26 if(isset($_GET['days'])){ 27 echo $_GET['days']; ; 28 }else{ 29 30 echo date("Y-m-d"); 31 32 } 33 34 ?>'; 25 35 //alert(dtr); 26 36 var InputValue = []; … … 60 70 }); 61 71 72 73 74 75 76 77 78 79 80 81 82 $('#update').click(function(){ 83 var dtr; 84 dtr = '<?php 85 86 if(isset($_GET['days'])){ 87 echo $_GET['days']; ; 88 }else{ 89 90 echo date("Y-m-d"); 91 92 } 93 94 ?>'; 95 //alert(dtr); 96 var InputValue = []; 97 var selectedSource = []; 98 var selectedTime = []; 99 var selectedMeasurement = []; 100 var Time; 101 var Source; 102 var measure; 103 var value; 104 var checks = 0; 105 for(var i=1;i <= cnt;i++) 106 { 107 if($('#Time'+i).val() != '') 108 { 109 Time=$('#Time'+i).val(); 110 Source=$('select[id="source'+i+'"]').val(); 111 measure=$('select[id="measurement'+i+'"]').val(); 112 value=$('#txtData'+i).val(); 113 selectedMeasurement.push(measure); 114 selectedSource.push(Source); 115 selectedTime.push(Time); 116 InputValue.push(value); 117 118 }else{ 119 checks++; 120 121 } 122 } 123 124 if(checks == 0){ 125 window.location = 'Transaction/update.php?Time='+selectedTime+'&Source='+selectedSource+'&measure='+selectedMeasurement+'&Data='+InputValue+'&Date='+dtr; 126 }else{ 127 128 alert("Please fill all the details!"); 129 } 130 }); 131 132 133 134 135 136 137 138 62 139 }); 63 140 </script>
Note:
See TracChangeset
for help on using the changeset viewer.