how to make the reply for existing comments? – PHP

  php

Q(Question):

i used button for reply action.when click the reply the text box will com using ajax.the ajax function is called through button as i said earlier. but i want to post my reply for corresponding comments so any one plz help to how to pass the id through button.

A(Answer):

hi marimuthuit,
assign the id at the time when you show the comment the message field is populating the text inside the textarea / div to which you need to reply you need to pass the id in the onclick function as a parameter


<input type='button' name='reply' id='reply' value='Reply' onclick='replyComment("<?php echo $message_id?>")' />

A(Answer):

Thank you for reply…..
You Are send this code by using of html. But i am using PHP and Ajax. So this code shows Error Msg. How can i convert this code into PHP. Reply me.

A(Answer):

<?php
echo "<td><input type=’button’ name=’reply’ id=’reply’ value=’Reply’ onclick=’call_login(".$row[‘sno’].")’ /></td></br>";
?>
This code contains error.

A(Answer):

function call_login(int)
{
var sno = window.document.f1.reply.value;
var url = "action.php?sno="+sno;
postRequest(url);
}

This is my Ajax Function. How can i send $sno into action.php page.

A(Answer):

hi try this


<?php
echo "<td><input type='button' name='reply' id='reply' value='Reply' onclick='call_login(".$row[\'sno\'].")' /></td></br>";
?>

A(Answer):

great really wondering how to get through this

LEAVE A COMMENT