php - Passing post value with ajax -


i have code in index.php:

 $('#whois').click(function () {         //console.log("button clicked");             $('#whois_content').html("");             $('#fade').fadeout('slow', function () {                 urllinkas();             });         }); 

i want pass post value test.php inside script, so:

 $('#whois').click(function () {         //console.log("button clicked");         $.ajax({         type: "post",         url: "test.php",         data: info,         success: function(){         //dont know write here         }             $('#whois_content').html("");             $('#fade').fadeout('slow', function () {                 urllinkas();             });         }); 

and call post value in test.php $_post['info']

maybe understand im saying.

this better

$.post("test.php", { info: "something", moreinfo: "something else" }) .done(function(data) {     $('#whois_content').html("");     $('#fade').fadeout('slow', function () {         urllinkas();     }); }); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -