Questions tagged [submit]

Refers to the action of sending data to a specific destination.

Examples include HTML form submission and the jQuery submit function.

5127 questions
1637
votes
31 answers

JavaScript post request like a form submit

I'm trying to direct a browser to a different page. If I wanted a GET request, I might say document.location.href = 'http://example.com/q=a'; But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not…
Joseph Holsten
  • 19,514
  • 6
  • 23
  • 28
1017
votes
20 answers

jQuery AJAX submit form

I have a form with name orderproductForm and an undefined number of inputs. I want to do some kind of jQuery.get or ajax or anything like that that would call a page through Ajax, and send along all the inputs of the form orderproductForm. I suppose…
Nathan H
  • 44,105
  • 54
  • 154
  • 235
595
votes
20 answers

Two submit buttons in one form

I have two submit buttons in a form. How do I determine which one was hit serverside?
Alex
  • 37,703
  • 43
  • 90
  • 124
347
votes
20 answers

Submitting a form by pressing enter without a submit button

Well I am trying to submit a form by pressing enter but not displaying a submit button. I don't want to get into JavaScript if possible since I want everything to work on all browsers (the only JS way I know is with events). Right now the form looks…
PythonPower
292
votes
16 answers

"Submit is not a function" error in JavaScript

Can anyone tell me what is going wrong with this code? I tried to submit a form with JavaScript, but an error ".submit is not a function" shown. See below for more details of the code:
Jin Yong
  • 38,582
  • 71
  • 132
  • 177
251
votes
10 answers

submitting a GET form with query string params and hidden params disappear

Consider this form: When submitting this GET form, the parameters a and b are disappearing. Is there a reason for that? Is there a…
None
202
votes
6 answers

JavaScript Form Submit - Confirm or Cancel Submission Dialog Box

For a simple form with an alert that asks if fields were filled out correctly, I need a function that does this: Shows an alert box when button is clicked with two options: If "OK" is clicked, the form is submitted If cancel is clicked, the alert…
matt
  • 2,280
  • 2
  • 14
  • 17
169
votes
5 answers

How can I build multiple submit buttons django form?

I have form with one input for email and two submit buttons to subscribe and unsubscribe from newsletter:
{{ form_newsletter }}
veena
  • 1,733
  • 2
  • 11
  • 6
141
votes
9 answers

How to open a new window on form submit

I have a submit form and want it to open a new window when users submits the form so i can track it on analytics. Here is the code I'm using:
Jack
134
votes
7 answers

Use a normal link to submit a form

I want to submit a form. But I am not going the basic way of using a input button with submit type but a a link. The image below shows why. I am using image links to save/submit the form. Because I have standart css markup for image links I don't…
Upvote
  • 65,847
  • 122
  • 353
  • 577
123
votes
2 answers

AngularJS: disabling all form controls between submit and server response

I have a dilemma about what is the best (and correct) approach if I want to disable form controls (or at least make them unavailable for user interaction) during a period of time when user clicks sort of "Save" or "Submit" button and data travelling…
YoMan78
  • 1,288
  • 2
  • 9
  • 14
114
votes
7 answers

Avoid Angular2 to systematically submit form on button click

Ok so maybe this is unclear. Get this form:
113
votes
3 answers

jQuery's .on() method combined with the submit event

I've got a problem with .on(). I have multiple form-elements (forms with class="remember"), also I add another one form.remember using AJAX. So, I want it to handle submit event something like: $('form.remember').on('submit',function(){...}) but…
Anton Abramov
  • 2,031
  • 5
  • 21
  • 27
109
votes
4 answers

Submitting a multidimensional array via POST with php

I have a php form that has a known number of columns (ex. top diameter, bottom diameter, fabric, colour, quantity), but has an unknown number of rows, as users can add rows as they need. I've discovered how to take each of the fields(columns) and…
Fireflight
  • 2,621
  • 5
  • 22
  • 22
107
votes
14 answers

angular2 submit form by pressing enter without submit button

Is it possible to submit a form that does not have submit button (by pressing enter) example :
Florence
  • 1,311
  • 3
  • 11
  • 20
1
2 3
99 100