Have you checked the console to see whether the parameter you pass to your server side script is empty or not?
The code you pasted lacks a curly bracket, a closing parenthesis and a semi-colon, but I assume you've got it in your original code, haven't you? Best regards, Andreas