Forum Discussion
rholder
13 years agoAce
Has anyone successfully completed this solution? I'm interested in doing something similar on our site.
HaidongG
13 years agoLithium Alumni (Retired)
here is my code working with some JSON Web services.
function callAjax() { LITHIUM.jQuery.ajax({ url: "${ajaxURL}", dataType: 'jsonp', jsonp: 'callback', jsonpCallback: 'callbackFunctionOnceJsonpReturnedProperly', timeout: ${ajaxTimeout}, success: function(){ //alert("success"); }, error: function (jqXHR, textStatus, errorThrown) { ....... } }); } function callbackFunctionOnceJsonpReturnedProperly(data, textStatus, xhr){ if (typeof (data) == 'undefined' || data == null) { alert("jsonpCallback object is null"); return; } var username = data["username"]; }
- cblown12 years agoBoss
We think that Lithium should provide a way to pull external data in server side using Freemarker. Please support our Idea here http://lithosphere.lithium.com/t5/Ideas/Access-to-external-data-sources-via-a-custom-component-endpoint/idi-p/61442
Thanks
Chris
- rholder12 years agoAce
I added my support to your idea. In my particular situation, I would love to retrieve data from an external RSS feed and display it within a component.