jquery, Ajax calling and passsing parameter to php function?

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.

data : {action, 'getSubMenu('+ id +')'},

This looks like bad syntax. What exactly are you trying to do?

Proper JSON object would look something like this, assuming getSubMenu is a function

data : {'action': getSubMenu(id)},
Sponsor our Newsletter | Privacy Policy | Terms of Service