Changeset 16486 for schedule/Module
- Timestamp:
- 05/30/13 15:04:48 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/calendar.php
r16484 r16486 102 102 var year =this.selection.print("%Y").join("\n"); 103 103 104 /*105 var xmlhttp;106 var source = ['Mrk 421','Mrk 501','Crab'];107 var SourceData = [[]];108 var Time = [];109 var line = [];110 //var rows;111 var val = [];112 var T = [];113 var sources = 0;114 var xmlhttp = new Array();115 104 116 for(sources=0;sources<source.length;sources++) 117 { 118 alert(sources); 119 Data = new Array(source.length); 120 if (window.XMLHttpRequest) 121 {// code for IE7+, Firefox, Chrome, Opera, Safari 122 xmlhttp.push(new XMLHttpRequest()); 123 } 124 125 else 126 {// code for IE6, IE5 127 xmlhttp.push(new ActiveXObject("Microsoft.XMLHTTP")); 128 } 129 130 131 xmlhttp[sources].open("GET","http://www.fact-project.org/smartfact/index.php?source="+escape(source[sources])+"&time="+year+"-"+month+"-"+day,true); 132 xmlhttp[sources].send(); 133 //document.getElementById('data').innerHTML=source.length+""+Data[sources]; 134 135 } 136 137 for(sources=0;sources<source.length;sources++) 138 { 139 140 xmlhttp[sources].onreadystatechange=function() 141 { 142 143 //if (xmlhttp.readyState==4 && xmlhttp.status==200) 144 // { 145 146 Data[sources]= new Array(); 147 148 line=xmlhttp[sources].responseText.split('\n'); 149 for(row=0;row<line.length;row++) 150 { 151 rows=line[row].split(','); 152 Data[sources].push(rows[4]); 153 } 154 155 156 //GraphData(Data[sources], sources); 157 document.getElementById('data').innerHTML=sources + "...." + line; 158 //$('#data').append(line); 159 //} 160 } 161 } 162 163 /*function GraphData(DataSource, index) 164 { 165 for(i=0;i<SourceLength;i++) 166 { 167 for(j=0;j<DataSource[i].length;j++) 168 { 169 document.getElementById('day').innerHTML=DataSource[j]; 170 } 171 172 } 173 };*/ 174 function getXML() 105 function getXML() 175 106 { 176 107 if (window.XMLHttpRequest) … … 213 144 getXMLData(); 214 145 //display source data here sourceData[i] 146 document.getElementById('data').innerHTML=sourceData[i]; 215 147 } 216 148 }
Note:
See TracChangeset
for help on using the changeset viewer.