Making form's onsubmit to work only for particular submits

Bobby Clark the Flyer

In PHP program, I have JS function which validates submit <form ...onsubmit='return isOK();'>. It works OK. The problem is I want it to work only for particular submits, not for all. Is there any way inside the JS function to find out which submit was pressed, or some PHP trick

harry
instead of onsubmit u can use onClick.

<input type="submit" onclick="return pressSubmit1()" value="submit1" />

<input type="submit" onclick="return pressSubmit2()" value="submit2" />

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Making form's onsubmit to work only for particular submits

From Dev

WTForms only submits first form

From Dev

onsubmit still submits form even on return false from ajax verification

From Dev

form onsubmit doesnt work properly

From Dev

HTML/Rails form only submits on reload

From Dev

Button click submits the form only on Firefox

From Dev

Form onsubmit doesn't work with form .submit()

From Dev

Form onsubmit doesn't work with form .submit()

From Dev

Making sure only a particular group of characters are in a string

From Dev

jQuery Ajax form only submits after clicking twice

From Dev

Javascript Only the first button submits to Ajax form despite different Ids

From Dev

jQuery submits only one form when multiple forms are submitted

From Dev

A form's "action" and "onsubmit": Which executes first?

From Dev

Wicket: addOrReplace() inside Form's onSubmit()

From Dev

How to fire the HTML form's onsubmit event?

From Dev

Wicket: addOrReplace() inside Form's onSubmit()

From Dev

Making soft keyboard automatically disappear once user submits a form on a mobile device

From Dev

JavaScript: Form onSubmit does not work when function is called 'submit'

From Dev

form onSubmit method do not work in react.js

From Dev

Making box-plot with only particular rows pandas python

From Dev

Why jQuery submits this form?

From Dev

Form submits on page refresh

From Dev

Alternatives to HiddenFor on form submits?

From Dev

Form submits on page refresh

From Dev

Making form fields conditionally read only (PHP)

From Dev

Affecting a class of a particular row onsubmit

From Dev

PHP Form Submits But Only Updates Last Row.. Need to Update All Rows

From Dev

Multiple forms on one MVC form, created with a loop, only the first submits data

From Dev

How to bind anonymous function to form's onsubmit and then access that form's contents for AJAX submit?

Related Related

  1. 1

    Making form's onsubmit to work only for particular submits

  2. 2

    WTForms only submits first form

  3. 3

    onsubmit still submits form even on return false from ajax verification

  4. 4

    form onsubmit doesnt work properly

  5. 5

    HTML/Rails form only submits on reload

  6. 6

    Button click submits the form only on Firefox

  7. 7

    Form onsubmit doesn't work with form .submit()

  8. 8

    Form onsubmit doesn't work with form .submit()

  9. 9

    Making sure only a particular group of characters are in a string

  10. 10

    jQuery Ajax form only submits after clicking twice

  11. 11

    Javascript Only the first button submits to Ajax form despite different Ids

  12. 12

    jQuery submits only one form when multiple forms are submitted

  13. 13

    A form's "action" and "onsubmit": Which executes first?

  14. 14

    Wicket: addOrReplace() inside Form's onSubmit()

  15. 15

    How to fire the HTML form's onsubmit event?

  16. 16

    Wicket: addOrReplace() inside Form's onSubmit()

  17. 17

    Making soft keyboard automatically disappear once user submits a form on a mobile device

  18. 18

    JavaScript: Form onSubmit does not work when function is called 'submit'

  19. 19

    form onSubmit method do not work in react.js

  20. 20

    Making box-plot with only particular rows pandas python

  21. 21

    Why jQuery submits this form?

  22. 22

    Form submits on page refresh

  23. 23

    Alternatives to HiddenFor on form submits?

  24. 24

    Form submits on page refresh

  25. 25

    Making form fields conditionally read only (PHP)

  26. 26

    Affecting a class of a particular row onsubmit

  27. 27

    PHP Form Submits But Only Updates Last Row.. Need to Update All Rows

  28. 28

    Multiple forms on one MVC form, created with a loop, only the first submits data

  29. 29

    How to bind anonymous function to form's onsubmit and then access that form's contents for AJAX submit?

HotTag

Archive