Home jQuery AJAX submit form
Reply: 0

jQuery AJAX submit form

user5172
1#
user5172 Published in September 19, 2018, 6:43 pm

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 one way would be to do something like

jQuery.get("myurl",
          {action : document.orderproductForm.action.value,
           cartproductid : document.orderproductForm.cartproductid.value,
           productid : document.orderproductForm.productid.value,
           ...

However I do not know exactly all the form inputs. Is there a feature, function or something that would just send ALL the form inputs?

share|improve this question

15 Answers 15

active oldest votes
up vote 702 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.33662 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO