473,889 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Carry two values from Radio value...

Hi,

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

..... type=Radio Checked name=selectseri al value=" &
RS("PSL_F_Seria l").....

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

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 1771
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="selectser ial" value="<%=sValu es%>">
%>

<%
aValues = Split(Request.F orm("selectseri al"), "|")
%>

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="selectser ial" value="hiddenFi eld1">

<input type="hidden" name="hiddenFie ld1"
value="<%=RS.Fi elds.Item("PSL_ F_Serial").Valu e%>">
<input type="hidden" name="hiddenFie ld1"
value="<%=RS.Fi elds.Item("PSL_ L_Serial").Valu e%>">

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.goo gle.com...
Hi,

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

.... type=Radio Checked name=selectseri al value=" &
RS("PSL_F_Seria l").....

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

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
2582
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 problem I'm having is on the slaveform I loop through multiple records and want two values depending on the row they select. slaveform: x=selected
5
2157
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 the onclick action associated to my continue button always shows the value =1 instead the values selected under my radio buttons (Values= 4,3 or 1) I am showing the code. Ideas welcome.
2
12448
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 an idea on how to go abt doing it but Im stuck into converting into code.
1
1716
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 javascript before and I continue to run into problem after problem (object has no properties, undefined functions, etc.) So, I am really hoping someone can end the madness for me. Just so it's understood, the id's and names of the radio buttons vary with a row in a table so I CANT know the...
1
1850
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 them in JS although it looks simple. do i need to convert the values to numeric in JS.. pls help me I am stuck..i hv pasted the code below: ******************************** <html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId"...
8
2987
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 set of radio buttons with values to it and a select box with values too. Depending on the options selected from the two, the values will be calculated and displayed. everything worked fine with the calculation and im getting the right amount totalled up. I only have one issue, whenever the radio...
3
2024
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 Buttons</TITLE> <SCRIPT language=JavaScript> function process()
3
6892
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 checkboxes). My PHP file <?php //declare our variables $day = $_GET; $date = $_GET; $groupname = $_GET;
0
9810
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10894
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10442
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9610
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7150
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6029
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4251
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3256
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.