Here is the code snippet I am working with:
JSP :
String userId = rs.getString("user_id");
<center><a href="#" onclick="edit(\'' + userId + '\');">Edit</a></center>
JavaScript :
function edit(id)
{
alert(" user id is "+id);
}
Unfortunately, this code is not functioning as expected.
An error is being thrown indicating:
Uncaught SyntaxError: Unexpected token ILLEGAL