Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Submitting multiple forms on one page

Reply
Thread Tools

Submitting multiple forms on one page

 
 
belzibob
Guest
Posts: n/a
 
      08-19-2003
I have inherited a table where each row is a <form>

Each of these rows has only four columns, those being:
1) Item number
4) Quantity (blank textbox to fill in)
3) Description
4) Add link (to add just this one item.

That works fine but, now they want to have a submit button at the top
of the page, that when clicked, will submit every form whose quantity
has a value.

I have been searching, reading, and trying everything I could find
(I'm not a javascript programmer) to no avail.

Is this even possible? How can I accomplish this.

Thx
 
Reply With Quote
 
 
 
 
Fred Basset
Guest
Posts: n/a
 
      08-27-2003
Submitting a form on a web page has the same effect as clicking a link.
It will take you away from that page and on to the one specified by the
form (or determined by its action).

Theoretically you could submit all the forms on the page by writing ...

for (i=0; i<document.forms.length; i++) {
document.forms[i].submit();
}

... the problem is that you might as well just try and click all the
links on the page at the same time instead

The solutions are either to (tidier) rewrite the page to use only one
form or (less modification of current code) call a function which puts
the details of all the current forms into a new single one. The former
would be the preferable one.

Fred Basset


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Submitting two forms in one click paratge Javascript 4 04-16-2007 04:39 PM
eruby Mechanize problem when submitting multiple forms prasannakate@gmail.com Ruby 0 04-05-2007 04:01 PM
Submitting forms second time just resets page Steven Reid ASP .Net Datagrid Control 7 02-02-2005 03:31 PM
submitting two forms in same page? Bjorn ASP General 3 07-29-2004 02:33 PM
Submitting Multiple Forms NeoPhreak HTML 9 10-21-2003 11:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57