Results 1 to 2 of 2
  1.    #1  
    I am trying to create an app that uses an api to do a search. The app runs and I can place text into the list widget but as soon as I try to pull from the xml. I try to click search the emulator blinks like it is thinking but does nothing. Here is the code

    function SearchResultsAssistant(userURL) {
    this.userURL = userURL;
    var XMLHttpRequestObject = new XMLHttpRequest();"get", this.userURL);

    var xmlDocument = XMLHttpRequestObject.responseXML;


    // but when I add this..

    firstnamenodes = xmlDocument.getElementsByTagName(“first_name”);

    //that is when my app starts freezing. Can someone help please
  2. #2  
    Only asynchronous calls are supported (which is a third parameter to open with a value of true), so you have to write a callback function to process the result, and another to assign to XMLHttpRequestObject.onreadystatechange to receive notification of the state change.

    Here is an example of how it's all laid out: Ajax for Java developers: Build dynamic Java applications

    You can also use the Ajax.request APIs that are bundled with webOS, but I found it easier to work with what I already know until I have more time to spend reading and learning.

Posting Permissions