Hi
I am using Aptana 1.2 for making nokia s60 widget application.
I am not able to get response of "http://wap.delmy.com/goto.php?t=259737&link=~1&ref=wapdaycom" link using following code.
Tell me please where I am going mistake, Please help me to solve this problem.Code:HTML ---- <body onload="init()"> <div id="finalcont"> </div> </body> JavaScript ---------- FeedUpdateBroker.prototype.fetchFeed = function(feedURL, callback) { // remember callback this.callback = callback; // create new XML HTTP request this.httpReq = new Ajax(); // set callback var self = this; this.httpReq.onreadystatechange = function() { self.readyStateChanged(); }; // append the current time after the URL to bypass caches // here feedURL = http://wap.delmy.com/goto.php?t=259737&link=~1&ref=wapdaycom var fullURL = feedURL; // initiate the request this.httpReq.open("GET", fullURL, true); this.httpReq.send(null); } // Callback for ready-state change events in the XML HTTP request. FeedUpdateBroker.prototype.readyStateChanged = function() { // complete request? if (this.httpReq.readyState == 4) { // attempt to get response status var responseStatus = null; try { responseStatus = this.httpReq.status; } catch (noStatusException) {} this.callback.call(this, this.handleHTMLResponse(responseStatus, this.httpReq.responseText)); } } // Handles a completed response. FeedUpdateBroker.prototype.handleHTMLResponse = function(responseStatus, xmlDoc) { if (responseStatus == 200 && xmlDoc != null) { var finalcont = document.getElementById("finalcont"); finalcont.innerHTML = "OK: <br/>" + this.httpReq.responseText; // update was completed successfully return { status: "ok" }; //, lastModified: lastModified, items: items }; } else { var finalcont = document.getElementById("finalcont"); finalcont.innerHTML = "error: <br/>" + this.httpReq.responseText; // update failed return { status: "error" }; } }
Regards,
SymbianTH

Reply With Quote

