Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2009

    what does the onreadystatechange function do?

    Hi there!
    what does the onreadystatechange do? Is it a call back handler which is called once a http request has been made ?
    - make a http request
    - recieved a xml file
    -onreadystatechange will handle the xml parsing?

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Rome, Italy

    Re: what does the onreadystatechange function do?

    Hi asshaikh432,

    the onreadystatechange is, as you say, the callback handler that is called, for asynchronous http requests, when a state change of the request itself occurrs. The possible states are the following:
    0 = uninitialized
    1 = loading
    2 = loaded
    3 = interactive
    4 = complete
    So, it is not only called when the request is finished, but also for other intermediate states. This is why, within the onreadystatechange() function, you have to check if the request state is complete (4) before managing the response text/xml.

    Hope it helps,

Similar Threads

  1. ShortMsgReceived - Delphi
    By qb_soft in forum PC Suite API and PC Connectivity SDK
    Replies: 9
    Last Post: 2008-06-22, 10:30
  2. Help with lnk2019 lnk1120 error
    By yuenfatt in forum Symbian
    Replies: 8
    Last Post: 2007-08-24, 08:21
  3. EXecute function in RDbStoreDatabase
    By symbians60 in forum Symbian
    Replies: 4
    Last Post: 2007-01-23, 10:59
  4. C-code..unable to make sis
    By Symbian_Neil in forum Symbian
    Replies: 9
    Last Post: 2006-12-02, 07:55
  5. Problem with Nokia D211 Linux Drivers
    By fiveam in forum Multimodecards
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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