There is a function that is processed through click in textarea, how to do the same on the button? {{STORY_ID}} is the id of the post to which the textarea is attached, and {{PUBLISHER_ID}} is the id of the comment. That is, how to make the button send it all?

 onkeyup="postComment(this.value,{{STORY_ID}},{{PUBLISHER_ID}},event);"> 
  • onclick = "postComment (this.value, {{STORY_ID}}, {{PUBLISHER_ID}}, event);"> - tcpack4
  • Oh, what a cool solution) I guess I myself could not think of it before. Does he send the contents himself? - Gaioz
  • instead of this.value $ (this) .closest ('form'). find ('textarea [name = your_name]'). val () - tcpack4

0