I have the following piece of code which is a input content for a js lib:
content:'<a href="x.com" onclick="confirmDel("<%=user.name%>")" > <img src="delete.png" alt="Delete" width="15px" height="15px"></a></div>'
confirmDel(name)
{
if(confirm("delete " + name +" ?"))
{
// Do delete stuff
} else
{
return false;
}
}
when I click the delete link, it does not prompt me with the delete confirmation alert! what am I missing here? Is it about the way I pass the variable to the function?