Using Radio Buttons To Determine The Value Of A Field In A Form
not sure the best way to achieve this but basically i would like to have two sets of radio buttons. The first set determines whether the field DateFrom is todays date or a date entered
and the second set determines whether the field DateTo is todays date or an entered date
So far this is what i have got and its not working Code:
View Replies
ADVERTISEMENT
I have a group of radio buttons with the same name (which are in turn generated by the database). Since they share the same name, I can select only one of them.
Now I have another radio button which is not a part of the above group, but this radio button opens up a report which has different set of parameters to open a crystal report.
Now I want to know how to select only one radio button. Either from the group or this single radio button. User can select only 1 radio button at a time. Code:
View Replies
View Related
what coding used to select all the radio buttons when clicked on a certain radio button? example is the delete of the mail of radio buttons?
View Replies
View Related
I have a page with 10 buttons. I want to control the content of two variables (say vari1 and vari2) based on which button a user clicks. So if I click button1, vari1="1" and vari2="2"; If I click button2, vari1="3" and vari2="4", etc.
The variable contents are actually going to be text strings, not numeric values, I was just trying to keep the example simple. I've only ever used buttons to submit, reset, or call a javascript, so I'm just not familiar with how I would do this.
View Replies
View Related
i have 3 radio buttons on the form plain simple form
<input type="radio" name="Cars" id="Cars" value="vehicles_Cars">Cars
<input type="radio" name="Trucks" id="Trucks" value="vehicles_Trucks">Trucks
<input type="radio" name="Bicyles" id="Bicyles" value="vehicles_Bicyles">Bicyles
what i want to do is when the user clicks on one of them show a different form
if the user selects cars show cars forms this form will have different fields and different validation
if the user clicks on trucks show trucks form and that will have different fields and so on
View Replies
View Related
i have 2 radio buttons i want to fire a alert if the first one is selected here is my code
<input type="radio" name="vehicles" value="Cars"/>Cars
<input type="radio" name="vehicles" value="Bikes"/>Bikes
and here is the javascript
if(document.frm1.vehicles[0].checked)
{
alert("Cars was selected");
return false;
}
View Replies
View Related
I have a form for editing data and it has a set of radio buttons, what I need to know is how I make the correct radio button be ticked when I load the form. Code:
View Replies
View Related
I am stuck trying to validate a group of dynamicly created radio buttons.
http://forums.aspfree.com/images/icons/icon6.gif
i need help in calling the groups that are being generated since the number of groups depends on the first page, where the selections are made I am using a for loop to generate each group of radio buttons. each group holds three radios I am not good with javascript.
View Replies
View Related
What is the difference between radiobuttons in html vs. asp? What kind of reasons would I use to choose one over the other?
View Replies
View Related
I have 2 radio buttons, Yes and No. I have a text box with a value entered by the user. If the user selects the Yes radio button, I need to add 339 to the value they entered. They will submit the form to add the value...but the problem I am getting is, it keeps adding 339 more than once. If there is also a way...where they select yes and submit and go back to no...to set the value back to the value they entered.
How can I add 339 to a value the user entered without continuing to add 339 if the form is submitted multiple times?
View Replies
View Related
I want to genarate radio buttons using array variables and for loop .what is wrong with what i have done ,help me with the correct syntax for it. I hope I,ll be able to convey you what i want to achive by the below code
<%
Dim famname(6),i
famname(1) = "Jan Egil"
famname(2) = "Tove"
famname(3) = "Hege"
famname(4) = "Stale"
famname(5) = "Kai Jim"
famname(6) = "Borge"
For i = 1 to 6
response.write("<input type=radio name=test value=famname(i) > famname(i)<br>")
Next
%>
View Replies
View Related
I have the following line of HTML code in one of my pages.
<input type="radio" name="MOTM" value="Alan" onclick='DisableRunnerUpButton()';/>Alan Purton</br>
Is it possible to change the values MOTM and Alan to variables that are stored in my asp page so that I can refer to them in code? If so, can you someone give me a pointer as to how to do this or where to find the documentation to read up on this please?
View Replies
View Related
I've made a content managment system that uses icons to represent page
layouts. To choose a different layout, the user clicks on a radio button
associated with each layout icon. On click of one of the radio buttons, the
form submits and a new layout is chosen.
I would prefer if people can click on the icons themselves , rather than
using the radio buttons.The border or background associated with the
selected icon can highlight conditionally, based on a DB lookup. The
highlighting will indicate the selection.
I know how I could do this "by hand", associating each image with code that
would initate an insert to a database.
I would prefer it if I just bolt the image onto the existing structures in
HTML that manage radio buttons, and sub an image for the
button.
I seem to recall there is a way to do sub an image for the button. Can
anyone show me the syntax? Code:
View Replies
View Related
I have a number of names in a database and I need to connect these names to radio buttons.
Basically a voting system. Users need to choose one of the options and the option they choose gets added to the total number of votes for that person.
I hope you understand what I'm trying to say. Anyway, I'm using Dreamweaver MX 2004.
View Replies
View Related
I got 2 radio buttons which has common name of division and value of --> yes and no.
How to retrieve information from radio buttons from the form.
like if my radio button --> yes is checked , I want it to show yes on my page when i have submitted my form. what do i have to use ... --> request.????? Do i need to use arrays to retrieve info?
View Replies
View Related
I am in the process of building a Simple Survey, and I am having trouble getting started. I have put together my html form, and now I need to build my "survey.asp" page to communicate with my Access database. I have designed my database to have 3 tables: Department, Contract, Survey.
Basically from each question the Survey Table will be populated. The survey table is in this format [SurvID (prim key), ques1, ques2, ...contractID.]
So if a user on question 1 clicked radio button "1radio1" then the number one should populate "ques1" field etc. Same goes for question 5, if the user chooses "5radioN" then "N" would populate the "ques5" field.
Also on there will be a drop down menu on the top of the page where the employee can choose the contractID. How would I incorporate that as well? Code:
View Replies
View Related
I'm hoping there is a way to do what I am trying. I have an asp page with 3 radio button choices. Depending on which radio button the user selects, I want to populate some drop down menus with different choices.
I have the case statement for the drop down boxes. Problem is, the html value from the radio button isn't actually used until you submit the form, so the case statement isn't finding any information to use to populate the menus.
Does that make sense?
So is there a way to make the radio button selection an immediately usable variable on the same page?
View Replies
View Related
I am working in ASP.NET and I do have groupname of TrainReport for all of my radiobuttons. I have found lots of documentation of how to put groupnames in radiobuttons. What I have not found is how programmically I can use the radiobutton groupname in the code to distiguish between the radiobuttons.
In VB 6.0 the group of radiobuttons would have the same name and would be refered to in an index by the order of the buttons. TrainReport(0), TrainReport(1), TrainReport(2), etc. I could use case statement on the index.
Case 0 would be if TrainReport(0) was selected and I would have code I want to do if this was selected, Case 1 would be if TrainReport(1) was selected and I would have code I want to do if this was selected, etc.
I have not found in documentation in Visual Studio, google searches, etc. a useful purpose of radiobutton group names.
View Replies
View Related
how can i validate against check boxes and radio buttons?
View Replies
View Related
I have 2 radio buttons & 2 combo boxes.how can i change the combo box to enabled state only when the radio button associated to it is checked? I want this to happen at once (without having any submit buttons).
View Replies
View Related
I have a form on a web page with a number of radio buttons bound to
the same field. Is it possible to set up the form so that users can
select more than one radio button to submit multiple values to a field
in the way that you can, for example, in a drop down field?
View Replies
View Related
I need a script that will allow users to select various answers using radio buttons and text fields and then able to submit to my email address. Any ideas?
View Replies
View Related
I’ve a few radio buttons; few of them have input textboxes and dropdown list.
I use Select case to insert values (depend on which radio button that you've selected) into the sql db but it doesn’t work. Then I use if, elseif and else…the value of radio still doesn’t insert into the DB. In this case how can we insert the value(s) into the DB? Code:
View Replies
View Related
I am bringing in a repeated field from a database and I would like to assign values to radio buttons to be associated with each record. The number of repeated fields will be different for each person, so I cannot enter values for each repeated record. I need a way to assign a variable as well as a value to each record that is being brought in from the database. For instance:
Radio Button Value 3 4 5
Repeated Record 1 O O O
Repeated Record 2 O O O
Repeated Record 3 O O O
I had received some great code from Memnoch, but it created one group for the entire Repeated field, so I was only able to select one radio button for all of the repeated fields. I need to select them seperately and I then need to Request the variable so that i can add, multiply and divide that variable with other repeated variables.
View Replies
View Related
I try to change "checked" property of the radio buttons when I click on the text box.
Here is my code:
<form name="form1" method="post" action="response.asp">
<input type="radio" name="radiosample" checked>Sample #1<br>
<input type="radio" name="radiosample">Sample #2<br>
<input type="radio" name="radiosample" >Sample #3<br>
<input type="text" size="20" name="text_box" onClick="Check_radio()">
</form>
<script language="vbScript">
Sub Check_radio()
form1.radiosample.checked(2)= True
End Sub
</script>
I am getting an error: "Object doesn't support this property or method "form1.radiosample.checked'.
What is wrong?
View Replies
View Related
I have a simple add/change/delete feature going on. I have a products table that I'm selling mock products from. I have a column named category, which users either select baseball or basketball from the radio buttons on a form. I can't figure out how to make this work. I'm implying that the code is working, the record is adding to the database, just not the category field, and when I display all the fields out of my database onto a html page the category field is blank. Below is the code I have.
<tr>
<td>Category:</td>
<td>Baseball<input type="radio" name="category" value="baseball">
Basketball<input type="radio" name="category" value="basketball"></td>
</tr>
Then I dim out a strCategory variable and set it equal to the request object "category"
View Replies
View Related
It s very basic question..but stil i am getting a bit confused.I want to have two radio buttons which can be selected as well be deselected. The value shud be inserted in the DB.
How should i go on doing this. Also if i want to see my selection when i return back to the order page..how should i pull it from DB and display the radio button with the dot in it(checked )?
View Replies
View Related
Basically, I have 2 separate drop-down lists, we'll call them List1 and List2.
Say List1 contains:
Fruits
Months
Sex
Now, I would like all 2 lists to be on the same page. A user would proceed to select something from List1, say "Fruits". Upon clicking on the drop down list for List2, the list items should automatically be updated to predefined items, say "Apples", "Oranges" and "Pears".
if the user changes his mind and goes back to select "Months" from List1, List2 should immediately display stuff pertaining to List1 items, say "January", "February", "March" etc etc....
View Replies
View Related
I have a recordset with two three fields. One is an autonumber field called ID , one is a text field called Name and the last is a date/time field called DateEntered. How can I programatically determine the autonumber field ? Code:
View Replies
View Related
Im having a little trouble with a simple form request My form has a field for people to add the filename that they saved their document in. Once that is entered my submit page takes the filename and adds the hyperlink html and the mapped path to that directory That way even "less intelligent" people can add hyperlinks to the database The problem Im having is that i cant find the code to make it to where if the value of a radio button is true then not to request the hyperlink field.
Don't get me wrong I am very much a newb at this so I assume its really easy or there is something Im not grasping here. So I guess the question is, Is there a simple line of code to relate a radio button to another form field?
View Replies
View Related
is there a way to determine if a form object actually exists? if i use the following syntax:
varTextField = Request.Form("txtFormField")
then varTextField = "" which gives the same result whether the input field "txtFormField" doesn't exist or it does exist but it was left empty
why can't i use something like? if Exists(Request.Form("txtFormField")) = true then
'whatever..
View Replies
View Related
I am trying to pass a hidden field value on a form into another field on the
form so that it can then be inserted in the database, to enable me then to
reference that number at a later date.
(The hidden value (1 for example) would then automatically get passed to the
other input field.)
The code for the text field that allows users to type an number into it for
submission to the db is below, but what code do i need within the hidden
field to populate this text field below so that users do not have to type the
number in? Code:
View Replies
View Related
I have an edit and delete button. The delete button is using the form action to indelete.asp. I also want to use the edit button which needs to use the form action.
I tried putting the edit button under a different form name but then I could not get the values to pass. Do I need to do this through a javascript function? Or maybe a different method?
View Replies
View Related