Time for a bit of troubleshooting:
Take a look at your HTML source when viewing the page through your browser. Locate the onClick="javascript:probando('data');" line.
if where it says data in the above example, there is a value in the source then there is a problem with your javascript function.
However, if the line resembles this:
onClick="javascript:probando('');"
then there is no data within the php variable: $var
The way to call the function that I posted last is correct. It's likely that it will be one of the above.
Cheers.