Dear all I am using JQuery and javascript, I need to Call the JQuery function inside my Javascript.
My jQuery:
function display(id){
$.ajax({
type:'POST',
url: 'ajax.php',
data:'id='+id ,
success: function(data){
$("#response").html(data);
}//success
}); //ajax
//Here i need to Return the ajax.php salary
//return ?
}
My ajax.php has
<?php
session_start();
....
echo "$salary";
?>
My Javascript function has
my.js
function showName(){
var id=12;
var a=display(id); //here i need to call the jQuery function display()
}
How to call the JQuery function inside javascript and how to return the PHP Values to JQuery?