I want to pass parameter to php function from jquery ajax. Only method I know is to call php file and adding query string variables to it.
Heres my jquery code :
[code]$.ajax({ var id= parseInt(this.id);
type : ‘GET’,
url : ‘./code/GetData.class.php’,
data : {action, ‘getSubMenu(’+ id +’)’},
cache : false,
success : function(items) {
document.getElementById("#divPurchaseContent").html(items);
}
});[/code]
stuck pretty bad. Did not find anything on internet. Thanks if any one can help.