开发者

webservices in palm pre

How to retrieve photo images from facebook. and how to call .ne开发者_JAVA百科t webservices in palm pre?


For getting images or other content onto the device, you are looking for the Download Manager

For calling a web service, you use the typical Javascript AJAX methodology of the XMLHTTPRequest object. You also currently have the option of using the wrapper functions of the Prototype framework currently included with WebOS. There is no promise that Prototype will always be there, however you can distribute the library with your app if needed.

For Prototype, you are using the Ajax object.

   var request = new Ajax.Request("http://myweb.com/servicename", {
       method: 'get',
       evalJSON: 'false',
       onSuccess: this.requestSuccess.bind(this),
       onFailure: this.requestFailure.bind(this)
   });

Ajax.Response will give you access to the data. Look at the Prototype Framework docs for more info.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜