I can’t figure out why the following code doesn’t work. For the time being, the php function “alias_valid” just returns a string for testing purposes, so I haven’t included the php function here. The alert is empty.
$.post(SITE_ROOT + "includes/AbstractEvent.php",{
action:"alias_valid",
alias : alias},
function(v){
alert(v);
});
There’s no
actionargument in$.post. Try to concatenate it to the end of the url instead.But i doubt this will work unless you are using an MVC framework. Or some kind of request routing that calls the specific function within the class.