I am trying to run the script getNewFollowing.pl from jquery, here is the code:
$(document).ready(function(){
$("#cross").livequery("click", function(e){
e.preventDefault();
$.post("getNewFollowing.pl,
function(data){
$('#follow_name1').text(data.userName);
$('#follow_email1').text(data.userEmail);
});
});
});
When I click the link with ID="cross", it should call a perl file which returns userName and userEmail.
This code is not invoking the perl script. What am I doing wrong?
You’re missing a quote (“) after “getNewFollowing.pl”.
Note that there are a lot of helpful tools (for all major browsers) out there that help you narrow problems like this down faster. Information coming from these tools is also valued here on StackOverflow when you ask your question.