Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • AJAX request

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 99
    Comment on it

    To send the request on server open() and send() can be used in ajax.

    These are the method of XMLHttpRequest object.

    xhttp.open("GET", "ajax_info.txt", true);
    xhttp.send();

    open- specifies the type of request

    open(method, url, async)- method- the type of request GET or POST.

    GET- for sending small data

    POST- for sending large data

    url- the server address.

    for cached result we create a unique id and append in the url.

    xhttp.open("GET", "demo_get.asp?t=" + Math.random(), true);
    xhttp.send();

    async- true or false

    true = asynchronus

    false = synchronus

    send()- if GET is used

    send- If POST is used.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: