Answer the question
In order to leave comments, you need to log in
How to catch the pressed button on the .submit event?
I have a form with two buttons.
<form>
<!-- поля формы -->
<button type="submit"></button>
<button type="submit" name="printing"></button>
</form>
name
does not come to the server and it will not work to determine which button is pressed by it (on the server). _this.submit (event) ->
event.preventDefault()
//.......
// здесь отлавливаю кнопку, которая нажата и ее атрибуты
$.post $(this).attr('action')
, $(this).serialize() + printing
, (data) ->
//.......
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question