Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Mulitple JSON request in one window

$
0
0

Is it possible to get multiple JSON requests by putting in one window and result it in the same window? Because I have data from one url and other data from the other url. And need to display it on one window.

Say example below: //JSON REQUEST1

url1 = 'www.sample1.com/sample.php?id=1';
var xhr = Ti.Network.createHTTPClient({........
 
xhr.open("GET", url1);
xhr.send();
 
//JSON REQUEST 2
url2 = 'www.sample1.com/sample.php?id=2';
var xhr = Ti.Network.createHTTPClient({........
 
        xhr.open("GET", url2);
        xhr.send();

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>