I am facing an issue with passing the id into a javascript onClick method. I am using the Spring framework and in the controller class, I send the related id to the JSP file like this:
model.addAttribute("uploadid", uploadid);
Afterwards, I need to pass this uploadid to the javascript onClick method. I have attempted to do so as shown below:
<a href="#" onClick="uploadThumbnailClicked(\''+"${uploadid}"+'\')"><spring:message code="thumbnail.new"/></a>
However, it is not functioning as expected.
Can someone offer assistance?