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

Multiple submit forms on one page

This is really an HTML question I think, but it probably won't take
much effort to answer (unless I'm answering or course). The HTML is
all ASP generated and the ASP generates exactly what I want but the
resulting HTML isn't working right.

It consists of multiple forms on a page with each form using a unique
name. The submit button in each form also uses a unique name. The
forms are supposed to submit a single value from a hidden field in the
form called "btnID" that in the subsequent page gets put into an SQL
statement as a value for "ID = "blah, blah, blah".

The problem is that it is sending the values from every form instead
of just the one I submitted from and the values get concatenated by a
comma. I only want the one vlaue from the one form I submited. Is
this normal behavor or is something wrong with the forms. Below is the
forms with all the excess stuff stipped out so you can read it easier.

----------- HTML Code ------------
<Form Name='1' Action=showrecord.asp Method='POST'>
<Input Type='Submit' Name='btn1' Value='Select'>
<Input Type='Hidden' Name='btnID'
Value='{F171C6B2-2562-4FE1-8C63-3B42C67A363B}'
</Form>

<Form Name='2' Action=showrecord.asp Method='POST'>
<Input Type='Submit' Name='btn2' Value='Select'>
<Input Type='Hidden' Name='btnID'
Value='{F9896BFC-ADD3-4F5D-893E-785CBA0233F9}'
</Form>

<Form Name='3' Action=showrecord.asp Method='POST'>
<Input Type='Submit' Name='btn3' Value='Select'>
<Input Type='Hidden' Name='btnID'
Value='{CFFAFBCC-9AF1-4C59-A0A2-005434914E14}'
</Form>
------------- End HTML Code ---------------

Below is the SQL that the targe page produces.
As you can it is sending the value (a GUID) from each form separated
by commas instead of just the one GUID.

SELECT *
FROM tblShoots
WHERE Id = {F171C6B2-2562-4FE1-8C63-3B42C67A363B},
{F9896BFC-ADD3-4F5D-893E-785CBA0233F9},
{CFFAFBCC-9AF1-4C59-A0A2-005434914E14}

What am I doing wrong?

--

Phillip Windell [CCNA, MVP, MCP]
WAND-TV (ABC Affiliate)
www.wandtv.com
Jul 19 '05 #1
2 2313
"Phillip Windell" <none> wrote in message
news:ux**************@TK2MSFTNGP09.phx.gbl...
This is really an HTML question I think, but it probably won't take
much effort to answer (unless I'm answering or course). The HTML is
all ASP generated and the ASP generates exactly what I want but the
resulting HTML isn't working right.

It consists of multiple forms on a page with each form using a unique
name. The submit button in each form also uses a unique name. The
forms are supposed to submit a single value from a hidden field in the
form called "btnID" that in the subsequent page gets put into an SQL
statement as a value for "ID = "blah, blah, blah".

The problem is that it is sending the values from every form instead
of just the one I submitted from and the values get concatenated by a
comma. I only want the one vlaue from the one form I submited. Is
this normal behavor or is something wrong with the forms. Below is the
forms with all the excess stuff stipped out so you can read it easier.

----------- HTML Code ------------
<Form Name='1' Action=showrecord.asp Method='POST'>
<Input Type='Submit' Name='btn1' Value='Select'>
<Input Type='Hidden' Name='btnID'
Value='{F171C6B2-2562-4FE1-8C63-3B42C67A363B}'
</Form>

<Form Name='2' Action=showrecord.asp Method='POST'>
<Input Type='Submit' Name='btn2' Value='Select'>
<Input Type='Hidden' Name='btnID'
Value='{F9896BFC-ADD3-4F5D-893E-785CBA0233F9}'
</Form>

<Form Name='3' Action=showrecord.asp Method='POST'>
<Input Type='Submit' Name='btn3' Value='Select'>
<Input Type='Hidden' Name='btnID'
Value='{CFFAFBCC-9AF1-4C59-A0A2-005434914E14}'
</Form>
------------- End HTML Code ---------------


You did not close the input tag of the hidden field (missing the ">").
Note, you should put the value of the Action attribute in quotes. Also,
it's generally a better idea to put the submit at the end of the form
instead of the beginning (that is, put all of you input before the submit to
make sure it has been processed).

Regards,
Peter Foti

Jul 19 '05 #2
Ah! Two sets of eyes are always better than one. :)

Thank you sir! I'll check it out after lunch and see what happens.

--

Phillip Windell [CCNA, MVP, MCP]
WAND-TV (ABC Affiliate)
www.wandtv.com

"Peter Foti" <pe***@Idontwantnostinkingemailfromyou.com> wrote in
message news:10*************@corp.supernews.com...
"Phillip Windell" <none> wrote in message
news:ux**************@TK2MSFTNGP09.phx.gbl...
This is really an HTML question I think, but it probably won't take much effort to answer (unless I'm answering or course). The HTML is all ASP generated and the ASP generates exactly what I want but the resulting HTML isn't working right.

It consists of multiple forms on a page with each form using a unique name. The submit button in each form also uses a unique name. The
forms are supposed to submit a single value from a hidden field in the form called "btnID" that in the subsequent page gets put into an SQL statement as a value for "ID = "blah, blah, blah".

The problem is that it is sending the values from every form instead of just the one I submitted from and the values get concatenated by a comma. I only want the one vlaue from the one form I submited. Is this normal behavor or is something wrong with the forms. Below is the forms with all the excess stuff stipped out so you can read it easier.
----------- HTML Code ------------
<Form Name='1' Action=showrecord.asp Method='POST'>
<Input Type='Submit' Name='btn1' Value='Select'>
<Input Type='Hidden' Name='btnID'
Value='{F171C6B2-2562-4FE1-8C63-3B42C67A363B}'
</Form>

<Form Name='2' Action=showrecord.asp Method='POST'>
<Input Type='Submit' Name='btn2' Value='Select'>
<Input Type='Hidden' Name='btnID'
Value='{F9896BFC-ADD3-4F5D-893E-785CBA0233F9}'
</Form>

<Form Name='3' Action=showrecord.asp Method='POST'>
<Input Type='Submit' Name='btn3' Value='Select'>
<Input Type='Hidden' Name='btnID'
Value='{CFFAFBCC-9AF1-4C59-A0A2-005434914E14}'
</Form>
------------- End HTML Code ---------------
You did not close the input tag of the hidden field (missing the

">"). Note, you should put the value of the Action attribute in quotes. Also, it's generally a better idea to put the submit at the end of the form instead of the beginning (that is, put all of you input before the submit to make sure it has been processed).

Regards,
Peter Foti

Jul 19 '05 #3

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

Similar topics

2
by: sandyde2 | last post by:
Hi all, I get the tough problem and expect to get help.. In a html page, I dynamically created many forms which named as NO+business_id. In each form there are two submit buttons to...
5
by: Tim Johnson | last post by:
Howdy: Let's suppose for illustration that I have a web page with 3 frames: Let's call them 'fStates', 'fCounties', and 'fCities'. On loading the page, fStates has a select list of states and...
2
by: Ben Turner | last post by:
Hi, I need to create an ASPX page that includes both traditional HTML Forms (which are submitted to a third-party site like a travel booking service) and also make use of the ASP.Net form. I've...
3
by: Saket Mundra | last post by:
I have multiple web forms in my application. The user after logging on is directed to form1 where he enters information desired. Once finished he is directed to form2 and the same procedure goes on...
1
by: Bill_W_Stephens | last post by:
I have a complicated page with several submit buttons. I don't want to create multiple forms because much of the input is shared and the code is getting very ugly. However I would like to determine...
5
by: Alex Maghen | last post by:
In ASPX 2.0 with MasterPages and all that, my entire page only has one actual <FORM>. But there are several different sections of the page that provide what are functionally separate forms with...
3
by: imrantbd | last post by:
I need array type name like "destList" must use for my destlist select box,not a single name.Or need a solution to capture multiple value of "destList" select box and send all selected value in php...
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
1
by: draw | last post by:
I have one container page "container.htm" In this container I have multiple iframes "iframepage1.htm", "iframepage2.htm", etc. and one button firing a js script to submit. In every iframe page I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?

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.