473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Submitting multiple forms on one page

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
Jul 20 '05 #1
2 6310
belzibob wrote:

[snip]
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.

[snip]

It doesn't make sense to do this. Each form can return a document. What
should a browser do with them all?

Rewrite the document to use a single form, and have the server-side script
do the work.

--
Jim Dabell

Jul 20 '05 #2
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
fr*********@whosyourdaddy.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: AC | last post by:
I hope someone can tell me why this is not working. I have a form that dynamically creates the code below. This is for one product and there are about 10 to 50 products that are listed depending...
2
by: Greg T | last post by:
Hi, I have a rather long form that I don't want people submitting unless they are absolutely sure they are ready. I figured the easiest way to prevent an accidental form submission by way of...
5
by: Don | last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is there some way, using JavaScript, to setup a <form> tag to do this? Thanks, Don ----==...
4
by: Tauqir | last post by:
Hi, Is there a trick for submitting an HTML form without action parameter pointing to the target file? I am trying to reverse engineer an html form inside a jsp page. and this is what I come...
0
by: Mike Kingscott | last post by:
Totally hacked off here. I've written a user control that contains a text box, a required field validator and a button (these being the cornerstone of a search facility), all as ASP.Net server...
2
by: Syam | last post by:
Hello everyone, I am just barely two months old into learning asp.net and vb.net. Currently I am working on a project to store customer database. I have a question about creating a preview page:...
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
4
by: paratge | last post by:
Hi, I'm updating one form in an iframe, with another in a main page. That works fine, th probliem is how to submit two forms with one click. For now i get an error "permission denied" how can...
3
by: erobinso | last post by:
I have a page that makes use of a tiny/hidden IFRAME that becomes triggered to load HTML into a SPAN element (via .innerHTML). The SPAN expands to display a form that then needs to be validated with...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.