SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    284
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    ajax.js download please

    A search of this forum shows requests for such a download from Matthew Eernisse's Build Your Own Ajax Web Applications.

    The only response I show is someone asking for help debugging what s/he typed in.

    Regards,

    Grnadpa Brian

  2. #2
    SitePoint Evangelist
    Join Date
    Mar 2008
    Posts
    551
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This maybe what you are looking for? Apologies if it isn't this is some code we have called ajax.js
    function ajax(url, vars, callbackFunction){

    var request = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0");

    request.open("POST", url, true);
    request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

    request.onreadystatechange = function(){

    if (request.readyState == 4 && request.status == 200) {

    if (request.responseText){

    callbackFunction(request.responseText);
    }
    }
    }
    request.send(vars);
    }


Bookmarks

Posting Permissions

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