×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    40

    xmlhttprequest timeout method?

    Hi is it possible to implement a timeout in QML's xmlhttprequest?

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: xmlhttprequest timeout method?

    Hi,
    I don't think it's possible with Qt/QML, or at lest I cannot see any easy way to implement such thing.
    But maybe you can achieve that with JS:

    var req = new XMLHttpRequest();
    ...
    req.timeout = 4000;
    req.timeout = function () { alert("Timed out!!!"); }
    req.send(...);

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    104

    Re: xmlhttprequest timeout method?

    Hi,

    req.timeout doesnt seem to be working. Have any body tried this ??

    -CK
    http://celluleus.blogspot.com

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: xmlhttprequest timeout method?

    Well, alert() doesn't work in QML.
    try with console.log() and the timeout's function should start to work.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    104

    Re: xmlhttprequest timeout method?

    Well, I meant req.timeout = 4000; ...

    So, how should it behave if it works as expected ?? what should be the state and status once timeout has occured ?

    -CK

Similar Threads

  1. QtScript + XMLHttpRequest
    By gurmukh in forum Nokia N9
    Replies: 9
    Last Post: 2010-08-25, 11:55
  2. XMLHTTPREQUEST
    By yynneejj in forum Symbian Web Runtime
    Replies: 7
    Last Post: 2010-06-08, 14:55
  3. Synchronous xmlHttpRequest
    By strider2k in forum Symbian Web Runtime
    Replies: 3
    Last Post: 2009-12-21, 11:29
  4. XMLHttpRequest problem
    By kogan_y in forum Symbian Web Runtime
    Replies: 3
    Last Post: 2009-12-18, 02:46
  5. XMLHTTPRequest 在CMWAP接入点无法得到结果
    By widsets in forum Web Technologies and Multimedia Content- Web 技术和多媒体内容
    Replies: 3
    Last Post: 2008-10-31, 07:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •