I have a simple html form like this
<table>
<tr><td >Topic: </td> <td> <input type="text" name="Topic"></td></tr>
<tr><td ><button id ="submit">submit</button></td></tr>
</table>
For this form i have implemented backbone.js, part of the code for backbone view is given below.
AppView = Backbone.View.extend({
events: {
"click #submit": "SubmitForm",
},
SubmitForm: function(){
topic = $("#Topic").val();
var subject_model = new App_Form();
subject_model.save();
}
My question is, when i include the form tag in the html form above. On click of the 'submit' button the SubmitForm function is not called. Whereas on exclusion of the form tag the SubmitForm function is called on click of submit button.
Could somebody help with this please!