Reference

All Ajax related reference

  • turned_in_notMethods
    MethodsUsed
    abort()To cancel the current request
    open(method,url,async,user,pwd)For request settings,
    method: Request type (like: GET, POST, HEAD)
    url: URL Path
    async: Asynchronous true/false
    user: username for url authentication (if any)
    pwd: password for url authentication (if any)
    send()To request the server using GET method
    send(data)To request the server using POST method
    setRequestHeader(header,value) To send any header to the server
    getResponseHeader(headerName) To get specific response header value
    getAllResponseHeaders() To get all response header values
    XMLHttpRequest() To create a XMLHttpRequest object

  • turned_in_notProperties
    PropertiesUsed
    onreadystatechangeTo define a function, called if readyState property changes
    readyStateTo hold the status-code of the XMLHttpRequest
    0: request not initialized
    1: server connection established
    2: request received
    3: processing request
    4: request finished and response is ready
    statusTo get the status-code of a request
    200: "OK",
    404: "Not Found",
    Many more Http Message & codes
    statusTextTo get the status-text (e.g. "OK" or "Not Found")
    responseText To access the response data as a string
    responseXML To access the XML response data
    responseURL To get the response url

  • turned_in_notEvents
    EventsUsed
    onloadstartTo define a event function, triggered at the start of the request
    onprogressTo define a event function, triggered while request in progress
    onabortTo define a event function, triggered when request is aborted
    onloadTo define a event function, triggered when request is received
    onerrorTo define a event function, triggered when any error occurred
    onloadendTo define a event function, triggered when request load ends
❮ Prev HTTP Headers
TryOut Examples"Learn to Explore..!"

TryOut Editor

receipt