Suppose i need to invoke a function (php) from inside a js function using AJAX, is the
following syntax correct:
$.post("phpReceivingFile.php", {func: (name: "james")}
.... ....
No, it won't work, you can't invoke specific php functions like that. I suggest sending a get parameter and inside your php do something like:
if($_GET['func'] == 'yourfunction') yourfunction($_GET['name']);
You might want to have a look at this short php/ajax tutorial to see how you get the variables sent to a php script.