Discussion Locked

radiobuttons and textboxes

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i a working on a website using asp, VB SCRIPT.
i am using radio buttons in a form
and i 'd like to submit its value from another form. the idea is to choose a radio button from form1 and then get its value in a TEXTBOX in form2 and then submit itfrom there. how can i get the value of the radio button in form1 to appear in a TEXT BOX in form2. i used the following code :
<% if radiobutton1_name="value" response.write("my string") %>
<% if radiobutton2="value" response.write("my string) %>this method worked in displaying the result on a table.. but how can i have the same idea but displaying the answer in a textbox

8 replies

by peyison

First, set the value of the radio button to a variable:

<% sValue = Request.Form("RadioButton") %>

If you have two radio buttons like:

Item 1

Item 2

The above code will return the value in the value property of the selected button.

Then, use that variable in the text box tag:

Hope this helps

by glen_mcleod

He's right. ASP is all server side, so you have to recover the value back to server, put it in a variable, then use that variable to load your text box on the following page.

Glen

by humpty

actually, i need the results of both radio buttons in different textboxes.
each result in a seperate text box.
implementing ur codes gives duplicate answers in all textboxes

by vcsekhar007

As simple as below:

Just paste the following code in the action page of your form( in which the radio buttons are placed.)

">

-------------Sekhar-----------

This discussion is closed to new replies.