anonīms Posted October 24, 2012 Report Share Posted October 24, 2012 lapā ir 3-4 formas. Katrā tiek ievadīti kkādi dati un jautājums ir tāds vai servera pusē ir iespējams savākt visus datus, kgan submit poga tiek nospiesta tikai vienai formai? <form> .. </form> asdadsasdad <form> .. </form> asdasdasdasd <form> .. </form> asdasdasdasd <form> .. </form> Quote Link to comment Share on other sites More sharing options...
rpr Posted October 24, 2012 Report Share Posted October 24, 2012 nāk prātā ajax katrai formai. Quote Link to comment Share on other sites More sharing options...
malinens Posted October 24, 2012 Report Share Posted October 24, 2012 (edited) Visticamāk tikai ar Ajax. Uztaisi fju, kas savāc visas vērtības no formu laukiem un tad submito Neesi pirmais un pēdējais, kas kaut ko tādu vēlas: http://stackoverflow...st-without-ajax Edited October 24, 2012 by malinens Quote Link to comment Share on other sites More sharing options...
daGrevis Posted October 24, 2012 Report Share Posted October 24, 2012 Pseido: data = [] for form in forms: data.append(form.get_data()) data.submit() Quote Link to comment Share on other sites More sharing options...
indoom Posted October 24, 2012 Report Share Posted October 24, 2012 $(function(){ $('form').submit(function(){ $.post(this.action||location.href, $('form').serializeArray(), function(){ location.reload(true); }); return false; }); }); Ja būs elementiem vienādi name dažādās formās (bez []), tad tik pēdējais būs redzams Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.