Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormike5672
    • CommentTimeJul 27th 2006 edited
     permalink
    Im using the folowing code for AJAX, how can I use this code to POST form data?

    function url(url)
    {
    var http_request=false;
    if(window.XMLHttpRequest)
    {
    http_request=new XMLHttpRequest();
    }
    else if(window.ActiveXObject)
    {
    try
    {
    http_request=new ActiveXObject('Msxml2.XMLHTTP');
    }
    catch(e)
    {
    try
    {
    http_request=new ActiveXObject('Microsoft.XMLHTTP');
    }
    catch(e)
    {
    }
    }
    }
    if(!http_request)
    {
    alert('Cannot create an XMLHTTP instance');
    return false;
    }
    http_request.onreadystatechange=function(){alertContents(http_request);};
    http_request.open('GET',url,true);
    http_request.send(null);
    }
  1.  permalink
    Does this help? http://www.captain.at/howto-ajax-form-post-request.php

    There is a working sample at the bottom of the page.
Add your comments
    Username Password
  • Format comments as (Help)