I need to be able to comment to an article, but also be able to reply to a comment using the same form. Fairly simple, but how do I know that a user clicked on "REPLY", and know which comment they clicked "REPLY" too? I'd imaging I need to add some attribute to the anchor, but I'm not sure what it should be. I'd like this to be a best practice kind of thing.
you have Spring-mvc, JSP, and jQuery at your disposal
these anchors are generated at the bottom of every comment, you have access to any comment info you need from the model at this point:
<a href="#" title="Reply"><img src="<spring:url value="/static/images/reply.png"/>" alt="reply" width="10" height="10" border="0" />REPLY</a
>
this is the actual form to make a comment:
<form:form action="comment.do" method="PUT">
<div class="aclass">
<h2>post a comment</h2>
</div>
<input type="hidden" name="replyto" value=""/>
<input type="text" class="commentArea" name="comment"/>
<div style="margin: 5px 0 0 0">
<input type="submit" value="Submit Comment" title="Submit Comment" />
</div>
</form:form>
brownie points for making clicking "reply" scroll the user to the comment form :)