I am catching event of form submit and adding divs to the DOM, code http://jsfiddle.net/testtracker/7rkX4/7/
now i want to pass some arguments to the function like name of the commenter, time comment was added etc. I want it to be something like this.
html
<form onsubmit=\"addComment(\'john deo\',\'post_id\')\">
<input ......>
<input ......>
</form>
javascript
function addComment(commenter_name,post_id){
perform operation....
}





Rating:
The post javascript – call a method on form submit with list of arguments appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/javascript-call-a-method-on-form-submit-with-list-of-arguments.html
No comments:
Post a Comment