Tech Rocks

Coldfusion
Java
JQuery

An online resource for latest web technologies like Coldfusion, JRun, Pro*C, JQuery, HTML5, PHP, W3C, Java, J2EE, C, C++, ORACLE, PL/SQL, MySql, Ajax, Coldbox, Fusebox, UNIX, JavaScript, NodeJS and much more...

Saturday, April 9, 2011

JQuery Ajax Post

Example:
function postit_1(obj) {
   
    var email = obj("#email").val();
    var url = baseurl + '/forgotPassword.cfm';
    url = url + '?' + (new Date()).getTime();
    showpreloader("forgotmsg");
    obj.ajax({            
        type: 'POST',
        url: url,
        data: {returnFormat: 'plain', email: email},                
        success: function(data, status) {
                //alert(data);
                obj("#forgotmsg").html(data);
        },
        error: function(e){
            alert("postit_1() function error: "+e.statusText);
        },
        complete: function(){}
        ,cache: false
    });
}

0 comments :

Post a Comment