473,326 Members | 2,012 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,326 software developers and data experts.

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 7495
g wrote on 29 mei 2007 in microsoft.public.inetserver.asp.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 programmatically is more something
for a clientside javascript NG, like comp.language.javascript.

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.netwrote:
g wrote on 29 mei 2007 in microsoft.public.inetserver.asp.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 programmatically is more something
for a clientside javascript NG, like comp.language.javascript.

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.public.inetserver.asp.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.querystring()] 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.netwrote:
Gravity wrote on 29 mei 2007 in microsoft.public.inetserver.asp.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.querystring()] 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*******@gmail.comwrote in message news:11*********************@j4g2000prf.googlegrou ps.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
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...
1
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...
5
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...
1
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. ...
6
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...
6
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...
3
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. ...
1
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...
5
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.