jquery - .serialize() not sending textare content or input content to database -


i using code submit forms content database.

$(document).ready(function() {     $.post("handlers/comment_handler.php", $("#comments_form").serialize()); }); 

i using textarea comment when types , hits submit not send typed in. have tried using <input type='text'/> won't user typed in input field. believe .serialize doing funny.

any thoughts?

that code above submitting page when page ready, not when person clicks button.

i expect see

$(document).ready(function() {     $("#mybutton").click( function(evt){         evt.preventdefault();         $.post("handlers/comment_handler.php", $("#comments_form").serialize());     }); }); 

Comments