I am trying to alert a returned value from a function and I get this in the alert:
[object Object]
Here is the JavaScript code:
You have a javascript object
$1 and $2 are jquery objects, maybe use alert($1.text()); to get text or alert($1.attr('id'); etc...
$1
$2
alert($1.text());
alert($1.attr('id');
you have to treat $1 and $2 like jQuery objects.