webService to retrive web content?

highig
edited May 2012 in Enyo 1.0
I am working on a project to build an app for Touchpad (well, for now). I planned it to view a web forum website, to retrieve the content from the server, save it, then parse, and css it the way want it to be on the Touchpad.

I have constructed the basic controls and stuff, works ok. However, I am stuck at the webService part for retrieving the content from the server. I have tried this for a long time I have the following code:
{kind: "Scroller", flex: 1, onclick: "getBBS", components: [
						//Insert your components here
							]},
							getBBS: function() {
								var xmlhttp = new XHR();
								xmlhttp.open("GET","http://www.theBBS.com");
								xmlhttp.send();
								var J=eval(xmlhttp.responseText);
							}
/*							{name: "getBBS", kind: "WebService",
								url: "http://www.theBBS.com",
								onSuccess: "gotBBS",
								onFailure: "gotBBSFailure"
							},
							this.$.getBBS.call(),
							gotBBS: function(inSender, inResponse, inRequest) {
								this.results = inResponse;
							},
							gotBBSFailure: function(inSender, inResponse, inRequest) {
								console.log("Got failure from getBBS");
							},
*/	
I have tried this way, an also I have tried the commented part to retrieve the info, but I don't think it's correct. I am developing it in eclipse with Aptana, package, install and launch with command line, run it on a virtualbox emulator in Ubuntu. It's kind of hard to debug it, since there is actually no debugging option out in this configuration.

I really want to contribute to WebOS community by adding my two cents to it. Any suggestions comments are deeply appreciated!

Comments

Sign In or Register to comment.