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

Running remote JS code

$
0
0

I have a PHP file which returns some JS code like

var someVar= <script type="javascript"> some script..... </script><noscript> ...... </noscript>;
document.write(someVar);
which I have been able to get from a remote server using XHR Get, but am unable to load the same in to a webview, Have tried

https://developer.appcelerator.com/question/122643/load-external-javascript-titanium-mobile

and

http://developer.appcelerator.com/question/127598/evaljs-in-remote-webview

But I seem to be doing something wrong, either the eval function fails or nothing shows up.

I am able to get this working on a desktop browser by just adding the snippet

<script type="text/javscript" src="source.php"></script>
Where am I going wrong?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



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