CLICK HERE TO EARN MONEY FREE

Wednesday, March 11, 2015

ajax in jquery

$.ajax({
    url:'email.php',  // passing parameter to cetrain php page
    type: "POST",   //method
    data: 'email='+$('input[name=email]').val(),    // geting value of textbox or combox
    success:function(html) {    
        $('#mydiv').html(html);                      //get response set particular field
    }
});
Or for GET, even easier:                      //simila like in GET method

$.ajax({
    url:'email.php?email='+$('input[name=email]').val(),
    success:function(html) {
        $('#mydiv').html(html);
    }
});

0 comments:

Post a Comment

 

TEKONOLOGY Copyright © 2011 -- Template created by TEKONOLOGY -- Powered by Blogger