473,387 Members | 1,550 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,387 software developers and data experts.

nested forms

Is it possible to have nested forms?

<form name="form1" method="post" action="pgm1">
<input type="text1">
<form name="form2" method="post" action="pgm2">
<input type="text2">
<input type="submit" value="submit form2">
</form>
<input type="submit" value="submit form1">
</form>

and when form1 is submitted action is agaisnt pgm1 with vars from from1
and when form2 is submitted action is against pgm2 with vars from form2
Jul 20 '05 #1
2 97855
Michael Hill <hi****@ram.lmtas.lmco.com> wrote:
Is it possible to have nested forms?
No, the HTML syntax explicitly forbids them.
and when form1 is submitted action is agaisnt pgm1 with vars from
from1 and when form2 is submitted action is against pgm2 with vars
from form2


No, you need to use a single form with two submit buttons and to set up
the server-side form handler so that it recognizes which button was
used and branches accordingly.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2
Michael Hill <no**********@ram.lmtas.lmco.com> wrote:
Is it possible to have nested forms?


No.

But it is possible to have a single form with multiple submit buttons, and
a server-side (e.g., CGI) program that does different things depending on
what submit button was used.

See also http://www.htmlhelp.com/faq/html/forms.html#two-submit
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"There is no right way to do the wrong thing."
Jul 20 '05 #3

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

Similar topics

3
by: Jeff Thies | last post by:
Sometimes I may have one form nested inside the other (this is an editable page). <form name="form1"> <form name="form2"> </form> <input type="text" name="form_element_for_form1"> </form>
1
by: Ken | last post by:
Can forms be nested? <form name = form1> <form name = form2> </form2> </form1>
0
by: Jamie | last post by:
Just thought i'd post this tip for developers who are having problems submitting HTML forms which reside inside a parent ASPX web form. basically, HTML forms wont submit correctly if they're...
2
by: pk | last post by:
Let me start off by mentioning that I'm not a web developer by any means. I welcome any and all tips regarding code cleanliness and would love to hear about any conventions that I'm breaking. I...
1
by: NA | last post by:
Is it possible to have adjustable tables (not Access tables per se) but those in Ms Word or Excel based on nexted forms three deep? In other words, if I have a main form, Repair History, both the...
1
by: oncewaswillow | last post by:
Hi, I have 3 nested forms and want to calculate a total on the first subform (as the form loads)by adding 2 fields from that form + to a field on the second subform. Second subform is and...
10
by: nimmi_srivastav | last post by:
Below you will see an example of a nested conditional expression that this colleague of mine loves. He claims that it is more efficient that a multi-level if-else-if structure. Moreover, our...
5
by: ~~~ .NET Ed ~~~ | last post by:
Hi, As you all know when an ASP.NET web form is created that will include web controls and such, it contains a FORM that that identifies the web form and its containing controls. Well, I have a...
8
by: =?Utf-8?B?QW1yaXQgS29obGk=?= | last post by:
Okay, after much research, I have discovered a few interesting things in ASP.NET. I have a MasterPage that has a WebForm on it and it looks like this: <body> <form id="controls"...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.