472,331 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Carry two values from Radio value...

Hi,

I have an ASP page with a form and the following code:

..... type=Radio Checked name=selectserial value=" &
RS("PSL_F_Serial").....

Tis will carry over the value of RS("PSL_F_Serial"), but I also have
another value which needs to be carried (2 values per radio button),
RS("PSL_L_Serial").

Can I send two sets of data this way, if so, how?

If this is possible, on the next page, how can I retrieve both values
into seperate variables ?
Appreciate your help
David
Jul 21 '05 #1
1 1685
You could delimit the values and then split them.

<%
sValues = RS.Fields.Item("PSL_F_Serial").Value & "|" &
RS.Fields.Item("PSL_L_Serial").Value
<input type="radio" name="selectserial" value="<%=sValues%>">
%>

<%
aValues = Split(Request.Form("selectserial"), "|")
%>

You don't have to use a | character. Just use something that cannot be in
value of that column in the database ever.
Another option is to do something like:

<input type="radio" name="selectserial" value="hiddenField1">

<input type="hidden" name="hiddenField1"
value="<%=RS.Fields.Item("PSL_F_Serial").Value%>">
<input type="hidden" name="hiddenField1"
value="<%=RS.Fields.Item("PSL_L_Serial").Value%>">

Witht that, the radio button is actually "telling" your code which hidden
inputs to read values from. There would be two hidden inputs for each radio
button. The hidden input pairs would have the same name, so the values
would be returned separated by a comma and a space.

Ray at work

"David" <da***@scene-double.co.uk> wrote in message
news:c1**************************@posting.google.c om...
Hi,

I have an ASP page with a form and the following code:

.... type=Radio Checked name=selectserial value=" &
RS("PSL_F_Serial").....

Tis will carry over the value of RS("PSL_F_Serial"), but I also have
another value which needs to be carried (2 values per radio button),
RS("PSL_L_Serial").

Can I send two sets of data this way, if so, how?

If this is possible, on the next page, how can I retrieve both values
into seperate variables ?
Appreciate your help
David

Jul 21 '05 #2

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

Similar topics

4
by: cwwilly | last post by:
Hello, Thanks for taking a look at this! Problem: I'm trying to pass multiple dynamic values between a slaveform and a masterform. The...
5
by: Mirovk | last post by:
The onclick action associated to my form´s radio buttons call to a vbscript were the session values are changed, this happens correctly but with...
2
by: Eric Layman | last post by:
Hi, I have a radio button and a combo box. Upon changing a value for radio button, the combo box values will be dynamically updated. I have...
1
by: Sideswipe | last post by:
I am trying to concatenate selected values from numerous radio button sets into 1 series and assign it to a single hidden field. I have never done...
1
by: Renjini Mary | last post by:
hi... i cant seem to get value of set of radio buttons thru javscripting.. i hv set values to the radiobuttons but cannot retrieve them or calculate...
8
by: crayfiss | last post by:
Hi, firstly I am a total freshie in all this. From what I have gathered on the web and this forum, I finally managed to get my form up. I have a...
3
by: norbit | last post by:
Hello, I’m new to learning JavaScript. I was trying out a simple script but I can’t seem to make it work: <HTML><HEAD><TITLE>Radio...
3
by: ToddFur | last post by:
I see several postings on this but I am still unable to figure out my problem. I can pass the values of my text field but not radio button (or even...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.