Results 1 to 8 of 8
  1.    #1  
    Ok I'm baffled here. I'm trying to use Ajax.Request to load XML.


    When I use an url which is local (animations/arrows.blm) it works fine. When I put a wrong local URL, the onFailure gets called. Great.

    When I try a remote URL (Arrows, SAME file) nothing happens. It doesn't call the onSuccess and it doesn't call the onFailure either.

    What the Frack? Any ideas?
    My shiny new TouchPad apps: Scientific RPN Calculator HD - Screamager HD
  2. #2  
    Your remote file is sending a content type plain text in the header. Maybe it needs to be application/xml or text/xml?
  3. #3  
    Did you check to see what status code is being returned by the remote server?
  4.    #4  
    Hmmm... if that is a requirement I may as well forget about this feature altogether.
    Still, I don't understand why I get no onSuccess AND no onFailure. None of the two fire....
    My shiny new TouchPad apps: Scientific RPN Calculator HD - Screamager HD
  5. #5  
    I used Ajax requests in my app and they work just fine for remote calls, so let's look at your implementation. Can you post the snippet of code that makes the call? Also, have you tried wrapping in a try/catch block to see if an error is being thrown?
  6. #6  
    Quote Originally Posted by TheMarco View Post
    Hmmm... if that is a requirement I may as well forget about this feature altogether.
    Still, I don't understand why I get no onSuccess AND no onFailure. None of the two fire....

    My experience has been, that if neither fire, there is something wrong with the command and it isnt running at all. Is there any code immediately after the ajax request that runs? code in the same function?
  7. moserjj's Avatar
    Posts
    468 Posts
    Global Posts
    470 Global Posts
    #7  
    Quote Originally Posted by DeusInnomen View Post
    I used Ajax requests in my app and they work just fine for remote calls, so let's look at your implementation. Can you post the snippet of code that makes the call? Also, have you tried wrapping in a try/catch block to see if an error is being thrown?
    ditto - post up your sample code so we can help you out. i use it all the time and it works great
  8. moserjj's Avatar
    Posts
    468 Posts
    Global Posts
    470 Global Posts
    #8  
    you might also try wrapping your ajax.request with a try/catch

    try {
    //ajax stuff here
    }
    catch(e) {
    Mojo.Controller.errorDialog(e);
    }

Posting Permissions