$.ajax method ,

function submitform(){var dataString = ‘name=’+ $(‘#name’).val() + ‘&email=’ + $(‘#email’).val() ; alert (dataString); $.ajax({ type: “POST”, // you are also use GET Method url: “http://rajeevphp2011.blogspot.in/”, // get value in this page ex: $_POST[‘name’]; data: dataString, success: function(data1) { // alert(data1); if(data1==’success’) { alert(‘Successfuly send ‘); return false ; } else { alert(‘please try again’); return false ; } } }); return false ; }

Name
Email

function submitform(){
var dataString = ‘name=’+ $(‘#name’).val() + ‘&email=’ + $(‘#email’).val() ; alert (dataString); $.ajax({      type: “POST”, // you are also use GET Method       url: “page.php”, // get value in this page ex: $_POST[‘name’];      data: dataString,      success: function(data1) {  alert(data1);  if(data1==’success’) { alert(‘Successfuly send ‘);   return false ;      } else {    alert(‘please try again’);    return false ;    }    }     });   return false ;   }

  

 

   

   

 

 

   

   

 

 

   

 

Name  
Email

   
          

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s