tidesdk - Trouble Opening External Web-Page -


i'm trying open external webpage in child window using following code

var secondwindow = ti.ui.createwindow("http://www.google.com"); 

this used work fine before stopped working, , tried open using

window.location.assign("http://www.google.com"); 

but doesn't work either. application console output is

[ti.network.analytics][error] failed url https://api.appcelerator.net/p/v1/app-track: couldn't connect server

can explain me what's happening here?

as far understood (just started learning sdk) can't this. define own window in app package writing html file, open using ti.ui object , external html content using httpclient of ti.network namespace. load needed html content or other json maybe , implant window html dom.

example:

first, create new window using own html file:

ti.ui.createwindow("app://special-window.html")  

in file execute javascript external resources html:

//request url var url = 'http://mywebsite.com/api/users/'; //create http client var client = ti.network.createhttpclient({     onload: function(e) {          //request complete data          //assuming not working xml          ti.api.info('response received '+this.responsetext);          // this.responsetext here (like adding dom)     },     onerror: function(e) {          //error received,     } });  //specify request type , open  client.open('get',url); //send request client.send(); 

the code taken docs. (as said, starting use sdk)

hope, bit :)


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -