Jump to content
php.lv forumi

Vairākas formas submits reizē.


anonīms

Recommended Posts

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>

Link to comment
Share on other sites

$(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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...