Changeset 7805 for trunk/src/map/inc
- Timestamp:
- Apr 17, 2010, 4:22:35 PM (15 years ago)
- Location:
- trunk/src/map/inc
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/map/inc/nodemapWL.js
r7802 r7805 14 14 //This function is called from index.php 15 15 function initialize_map() { 16 suggestMarkers(""); 16 17 //We will only do this function if the browser is compatible 17 18 if (GBrowserIsCompatible()) { … … 270 271 271 272 //Code from w3schools. http://www.w3schools.com/dom/dom_http.asp 272 function loadXMLDoc(url )273 function loadXMLDoc(url, targetDiv) 273 274 { 274 275 xmlhttp=null; … … 283 284 if (xmlhttp!=null) 284 285 { 285 xmlhttp.onreadystatechange=state_Change ;286 xmlhttp.onreadystatechange=state_Change(); 286 287 xmlhttp.open("GET",url,true); 287 288 xmlhttp.send(null); … … 308 309 } 309 310 311 function loadSuggest(url) 312 { 313 xmlhttp=null; 314 if (window.XMLHttpRequest) 315 {// code for Firefox, Opera, IE7, etc. 316 xmlhttp=new XMLHttpRequest(); 317 } 318 else if (window.ActiveXObject) 319 {// code for IE6, IE5 320 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 321 } 322 if (xmlhttp!=null) 323 { 324 xmlhttp.onreadystatechange=state_ChangeSuggest; 325 xmlhttp.open("GET",url,true); 326 xmlhttp.send(null); 327 } 328 else 329 { 330 alert("Your browser does not support XMLHTTP."); 331 } 332 } 333 334 function state_ChangeSuggest() 335 { 336 if (xmlhttp.readyState==4) 337 {// 4 = "loaded" 338 if (xmlhttp.status==200) 339 {// 200 = "OK" 340 document.getElementById("searchlist").innerHTML=xmlhttp.responseText; 341 } 342 else 343 { 344 alert("Problem retrieving data:" + xmlhttp.statusText); 345 } 346 } 347 } 348 310 349 function toggleGoogleSearchMap() 311 350 { … … 330 369 } 331 370 332 333 334 335 371 function suggestMarkers(value) 372 { 373 loadSuggest("inc/suggestions.php?value="+value); 374 } 375 376 377 378 379
Note:
See TracChangeset
for help on using the changeset viewer.