I want send to ajax username of current user, so :
<a href="#" onclick="return goto_confirm({{ user.username }})" ><b>Eat</b></a>
My function js :
function goto_confirm(theusername){
alert("Hello "+theusername.value);
var eating;
if(confirm("Are-you sure ?"))
eating = true;
else
eating = false;
return false;
}
But on click, I have this error :
ReferenceError: toto938 is not defined
"toto938" is the value of user.username...