Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User JasperGoes's Avatar
    Join Date
    Mar 2010
    Location
    Zaandam, Holland
    Posts
    71
    I have an object XMLHttpRequest called xhttp, on my specified timeout, i wish to cancel
    the request and unset the object to try again later on.
    Somehow, it didnt work as expected.

    alert(typeof(xhttp));
    xhttp.abort();
    alert(typeof(xhttp));
    xhttp=null;
    alert(typeof(xhttp));
    delete xhttp;
    alert(typeof(xhttp));

    All four alerts return 'object'.

    BrowserNG 7.1.4 / N97 & N97 Mini

    Any hints?
    Last edited by JasperGoes; 2010-04-18 at 18:44. Reason: Added phonetype and browserversion

  2. #2
    Registered User JasperGoes's Avatar
    Join Date
    Mar 2010
    Location
    Zaandam, Holland
    Posts
    71
    Nevermind, found a workaround.

    if (xhttp) { xhttp.abort(); xhttp=null; }

    typeof(xhttp) STAYS object, so it seems to be persistent whatever you do,
    but a followup if(xhttp) returns false after aborting and setting to null.

    might be helpful to some of you at some point.

  3. #3
    Nokia Developer Moderator isalento's Avatar
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    831
    Hello,

    To my understanding abort() should not destroy the xmlhttprequest object itself:
    http://www.w3.org/TR/XMLHttpRequest/#the-abort-method

    So basically you could reuse the old xmlhttprequest object after checking the state and aborting it if needed.

    Please correct me if I'm wrong

    Br,
    Ilkka

Similar Threads

  1. All incoming calls stored first as missed calls
    By lzisko in forum General Development Questions
    Replies: 7
    Last Post: 2009-10-13, 14:21
  2. Please Help! How do I retrieve recieved calls from N95?
    By ConsultantDavid in forum General Development Questions
    Replies: 5
    Last Post: 2009-09-06, 17:44
  3. Problems Recording Long Calls CMdaAudioRecorderUtility
    By mahesh_labhe in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2009-08-17, 16:23
  4. Replies: 4
    Last Post: 2009-07-12, 12:31
  5. ETelMM: Swap doesn't work on two received calls
    By iDeveloper in forum Symbian C++
    Replies: 4
    Last Post: 2007-10-25, 17:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved