I'm trying to put a reply button for each comment so when someone click on the button (for example "Reply"), a textbox will come up automatically where users can fill in a form.
I didn't do much so far...
PHP
<div id='replycomment' class='reply' onclick='jsReply($comment_id);'>Reply</div>
<div id='showreply'></div>
jQuery
function jsReply(comment_id) {
var form = '<form id="showReplyForm" action"add_reply.php" method="post">';
form += '<textarea name="replybody" cols="35" rows="2" maxlength="299"</textarea>';
form += '<input type="hidden" name="replybodyId" value="' + comment_id + '" />'
form += '<input type="submit" name="replysubmit" value="Reply"/></form>';
jQuery('#replybody').replaceWith(form); }
Can anyone PLEASE help me with that? it would be much appreciated. I'm a bit confused with the way I need to link the id from jquery to php...
Thank you