473,563 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looping through table data on form.submit

g
Hi Guys..

i know this might sound really really simple, but I'm kinda stuck..I
have this form..which has a table (created from stored procedure
values)..once the table is populated..i have some radio buttons (for
each row of the table) and a main submit button.

On clicking submit..i want to loop through the table..pick up the
first <TDbeing the user ID and the value of the radio button clicked
(currently I have my radio button ID set as UserID_0, UserID_1 ..
etc). And pass those into a stored procedure..

Any help would be great...thanks!

Cheers,
Gravity.

May 29 '07 #1
5 7511
g wrote on 29 mei 2007 in microsoft.publi c.inetserver.as p.general:
i know this might sound really really simple, but I'm kinda stuck..I
have this form..which has a table (created from stored procedure
values)..once the table is populated..i have some radio buttons (for
each row of the table) and a main submit button.
Do you mean a html table in a form?

If so. what is serverside [ASP] about it?
>
On clicking submit..i want to loop through the table..pick up the
first <TDbeing the user ID and the value of the radio button clicked
(currently I have my radio button ID set as UserID_0, UserID_1 ..
etc). And pass those into a stored procedure..
Yes Your Q seems a browser thing,
ASP knowing nothing about html forms, tables and radio butttons.

How to use the DOM programmaticall y is more something
for a clientside javascript NG, like comp.language.j avascript.

Or do you want to know what to do on the srver with the submitted data?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 29 '07 #2
g
Well lets put it this way, I have an ASP page..it loads up..reads data
from a database/ executed stored procedure..runs its loops on it..and
created an HTML table full of data. This HTML table also has a bunch
of radio buttons at the end.

The user selects 1 radio button on each row..and clicks a button
called Submit. On the button Submit..I call form.submit on it (unless
there's something better)...the action of the form (that holds the
table) is post and it appends &Update=1 in the URL..and reloads the
form.

On this reload..i check if I'm getting Update=1, if I am..then I want
to read all the values of the TD's and put them in a database
(including what they chose in the radio button).

Does this make sense? I believe this is something that I need to
trigger on client side and complete on server side.

Thanks a bunch for your help.
On May 29, 5:12 pm, "Evertjan." <exjxw.hannivo. ..@interxnl.net wrote:
g wrote on 29 mei 2007 in microsoft.publi c.inetserver.as p.general:
i know this might sound really really simple, but I'm kinda stuck..I
have this form..which has a table (created from stored procedure
values)..once the table is populated..i have some radio buttons (for
each row of the table) and a main submit button.

Do you mean a html table in a form?

If so. what is serverside [ASP] about it?
On clicking submit..i want to loop through the table..pick up the
first <TDbeing the user ID and the value of the radio button clicked
(currently I have my radio button ID set as UserID_0, UserID_1 ..
etc). And pass those into a stored procedure..

Yes Your Q seems a browser thing,
ASP knowing nothing about html forms, tables and radio butttons.

How to use the DOM programmaticall y is more something
for a clientside javascript NG, like comp.language.j avascript.

Or do you want to know what to do on the srver with the submitted data?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

May 29 '07 #3
Gravity wrote on 29 mei 2007 in microsoft.publi c.inetserver.as p.general:

[Please do not toppost on usenet !!!!!!!!!!]

I wrote:
>Do you mean a html table in a form?
If so. what is serverside [ASP] about it?
Or do you want to know what to do on the srver with the submitted
data?
Does this make sense? I believe this is something that I need to
trigger on client side and complete on server side.
No it does not really.
Well lets put it this way, I have an ASP page..it loads up..reads data
from a database/ executed stored procedure..runs its loops on it..and
created an HTML table full of data. This HTML table also has a bunch
of radio buttons at the end.
I hope you sensibly named all the to-be-posted fields,
be it input/text or input/radio. Whether they are put in a html table or
just divided by <ol><lior <brconstructs is not important to the
submission capacities of a form.

ASP loops can easily do that.

Do you have a Q about this part?
[Please add a strippped version of your ASP code if so]
The user selects 1 radio button on each row..and clicks a button
called Submit. On the button Submit..I call form.submit on it (unless
there's something better)...the action of the form (that holds the
table) is post and it appends &Update=1 in the URL..
This seemed to be the clientside code you asked about and for which this
NG is not the right place.
and reloads the form.
Reloads the "page"?
[A form is a clientside html element]
On this reload..i check if I'm getting Update=1, if I am..then I want
to read all the values of the TD's and put them in a database
(including what they chose in the radio button).
You do not need the Update=1, as ASP can easily see if the page request
includes POST/request.form() [or even GET/request.queryst ring()] data.

Simple serverside ASP work, you have a Q about this?
[Please add a strippped version of your ASP code if so]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 29 '07 #4
g
On May 29, 6:01 pm, "Evertjan." <exjxw.hannivo. ..@interxnl.net wrote:
Gravity wrote on 29 mei 2007 in microsoft.publi c.inetserver.as p.general:

[Please do not toppost on usenet !!!!!!!!!!]

I wrote:
Do you mean a html table in a form?
If so. what is serverside [ASP] about it?
Or do you want to know what to do on the srver with the submitted
data?
Does this make sense? I believe this is something that I need to
trigger on client side and complete on server side.

No it does not really.
Well lets put it this way, I have an ASP page..it loads up..reads data
from a database/ executed stored procedure..runs its loops on it..and
created an HTML table full of data. This HTML table also has a bunch
of radio buttons at the end.

I hope you sensibly named all the to-be-posted fields,
be it input/text or input/radio. Whether they are put in a html table or
just divided by <ol><lior <brconstructs is not important to the
submission capacities of a form.

ASP loops can easily do that.

Do you have a Q about this part?
[Please add a strippped version of your ASP code if so]
The user selects 1 radio button on each row..and clicks a button
called Submit. On the button Submit..I call form.submit on it (unless
there's something better)...the action of the form (that holds the
table) is post and it appends &Update=1 in the URL..

This seemed to be the clientside code you asked about and for which this
NG is not the right place.
and reloads the form.

Reloads the "page"?
[A form is a clientside html element]
On this reload..i check if I'm getting Update=1, if I am..then I want
to read all the values of the TD's and put them in a database
(including what they chose in the radio button).

You do not need the Update=1, as ASP can easily see if the page request
includes POST/request.form() [or even GET/request.queryst ring()] data.

Simple serverside ASP work, you have a Q about this?
[Please add a strippped version of your ASP code if so]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
No..I think I'm okay..I'll try it out and see if I can get it to
work!

Thanks!

May 29 '07 #5
You don't loop through a table, you need to obtain the form values through the request object.

You can read about "Processing Form Information" here:

http://msconline.maconstate.edu/tuto...SP/default.htm

"g" <vt*******@gmai l.comwrote in message news:11******** *************@j 4g2000prf.googl egroups.com...
Hi Guys..

i know this might sound really really simple, but I'm kinda stuck..I
have this form..which has a table (created from stored procedure
values)..once the table is populated..i have some radio buttons (for
each row of the table) and a main submit button.

On clicking submit..i want to loop through the table..pick up the
first <TDbeing the user ID and the value of the radio button clicked
(currently I have my radio button ID set as UserID_0, UserID_1 ..
etc). And pass those into a stored procedure..

Any help would be great...thanks!

Cheers,
Gravity.

May 29 '07 #6

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

Similar topics

4
1856
by: Colin Steadman | last post by:
I've create a simple survey using ASP. Its finished and works, but one aspect of my coding is annoying me and I cant figure out a better way of doing it. Basically the questions are stored in an Access 2000 table like this: QUESTION_NUMBER QUESTION 1 Question 1 text.... 2 Question 2 text....
1
5380
by: Diva | last post by:
Hi, I have a data grid in my application. It has 20 rows and I have set the page size as 5. I have a Submit button on my form and when I click on Submit, I need to loop through the rows in the datagrid. Using the items collection just gives me the 5 rows that are displayed on the screen. Is there any way of looping through all the rows in...
5
1231
by: greg | last post by:
HI, I have an asp page that loops through the forms collection gathering data from input controls that web surfers have entered in. The problem I have is when I get to the submit button, I get the follow error "Type mismatch: '' " "send me the brochure" is the text on the submit button. I don't know how to have the loop skip the submit...
1
5309
by: Ryan | last post by:
Hello. I was hoping that someone may be able to assist with an issue that I am experiencing. I have created an Access DB which imports an Excel File with a particular layout and field naming. Next the user can go into a Form which basically a dynamic query with a friendly interface that eventually outputs a table that is stored in the DB as...
6
2482
by: Fuzzydave | last post by:
I am back developing futher our Python/CGI based web application run by a Postgres DB and as per usual I am having some issues. It Involves a lot of Legacy code. All the actual SQL Querys are stored in the .py files and run in the .cgi files. I have the problem that I need to construct a row from two seprate SQL Querys, I have tried...
6
1807
by: Luke - eat.lemons | last post by:
Hi, Im pretty new to asp so all light on this question would be great. Basically i need to test to see what value is set (where to retrieve the data from) so ive done it like this: If Request.Querystring("id") = "" then TidF=Request.Form("TidF") Else
3
1282
by: Luke - eat.lemons | last post by:
Sorry for the post in this NG but im short on time to get this working and i haven't seem to of got a response anywhere else. Im pretty new to asp so all light on this question would be great. Basically i need to test to see what value is set (where to retrieve the data from) so ive done it like this: If Request.Querystring("id") = ""...
1
1843
by: assgar | last post by:
Hello I have changed the process code abit so it receives the data from the form and ensures the data in array format. This has eliminated my previous error. The problem I am experiencing is the looping is not displaying the all contents of the arrays. Do you have any idea what the problem is and how to fix the problem?
5
4442
by: thatcollegeguy | last post by:
Below are my 3php and 2js files. I create a table using ajax/php and then want to change the values in the tables add(+ number for teamid) id's for each specific td in the table. I don't know if I have the entirely wrong approach, but my code is below. Any or all help is appreciated! What currently happens is that the getdivision.php...
0
7664
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7638
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.