Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- search.processResults = function() {
- try {
- if (this.request.readyState == 4) {
- if (this.request.status == 200) {
- osm.leftpan.content.innerHTML = this.request.responseText;
- }
- }
- }
- catch( e ) {
- osm.leftpan.content.innerHTML = 'Ошибка: ' + e.description;
- }
- };
- search.search = function() {
- this.request = new XMLHttpRequest();
- //this.request.open('GET', 'http://nominatim.openstreetmap.org/search?q=test&format=json');
- this.request.open('GET', 'http://10.0.6.90:8088/api/testjs.py');
- this.request.onreadystatechange = function(){search.processResults(this)};
- this.request.send(null);
- return false;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement