Results 1 to 5 of 5
  1.    #1  
    Hello People

    I relly need your help!
    I am creating some Ajax.Request the problem is that i am requesting something that could timeout.
    Can i set the timeout time down? I think it is to high...
    I use code from another thread:
    Code:"Getting Data");
    var glUrl = "";
    new Ajax.Request(glUrl, {
        method: 'get',
    	parameters: {test: this.test},
        onComplete: function(){},
        onSuccess: function (transport) {"Das ist gut!"); },
        onFailure: function (failure) {"Nicht so gut!"); }
    So when the timeout is hit i just get the "onSuccess". Is there also a "timeout" method? Or du i have to check if the status is 200 after i hit onSuccess.
  2. #2  
    check for 200, I don't think there is a timeout method, but you could read the docs
  3. #3  
    prototype also supports on200 read here Prototype JavaScript framework: Introduction to Ajax
  4.    #4  
    Thank you for the input. Can i change the timeout time? Dont see it anywhere..
  5. #5  
    Google it

    prototype ajax.request requestTimeout - Google Search

    Might I recommend the page titled "Prototype AJAX Request Timeout Test" as it includes sample code.
    Arthur Thornton

    Former webOS DevRel Engineer at Palm, HP, and LG
    Former webOS app developer (built Voice Memos, Sparrow, and several homebrew apps and patches)
    Former blogger for webOS Nation and webOS Roundup

Posting Permissions