then a text area and a button:
<input size=7 name=total>
<input type="button" onclick=c()>
the function checks for the radio buttons then outputs its value in text
area.
<script type="text/javascript">
function c()
{if (p1[a].checked&&p2[b].checked)
total.value=parseFloat(p1[a].value)+parseFloat(p2[b].value)
}</script>
my question is what is the possibility of giving values to a and b such as
all radio buttons can be covered, is there a way to do this without having
to output all cases with else if structure.
I have been making a javascript dice throwing app(? or whatever it's supposed to be called), but can't figure out how to make 2 functions for one button. I'm trying to have both of my dice (6- and 20-sided) to be controlled by the same throwing-button, but have radiobuttons to decide which one to throw.
how I can make each radio button call a different page. For example If i click on radio button 1 and click submit it will take me to [url].... and if I click radio button 2 and click submit .
I want to make a link that will have a pop up with radio buttons. The user will press the buttons that make sense to them. This will then be put back into a form they are already filling out. Where can I learn to do something like this?
I'm trying to create a questionnaire style series of radio buttons which are hidden and then a different set of radio buttons displayed depending on the previous answer. eg
Q1 Is it a man? (if select yes then display)
Q2 Is he called John? (if no then display)
Q3 Is he called Gary? and so on...
I've been testing using the code below but wondered if anyone had any ideas on how this could be done easily?
I have 4 groups of radio buttons (4 different questions using radio buttons) that I need to be required but only if a check box is selected. Also, is there a way to disable these radio buttons if the check box has not been selected?
We have a page that combines HTML with a Java applet. The applet has a big rectangle in the middle of the page. Above the applet we have some dropdown menus that are in HTML (and JavaScript and CSS). We would like to make it so the dropdowns can temporarily be visible on top of the applet, and it doesn't seem to work. The applet seems to completely own its rectangle, and nothing with CSS or Z ordering seems to work to draw temporarily on top of the applet.
Does anybody have ideas for how to do this? We tried one trick with an IFrame that seems to work in IE but not in Firefox or Safari.
I have a Google Map running and get the country displayed to set a radio button for that country. The code retrieves the countryCode (variable is below) from Google, but I can't get the radio button to set. I am either not selecting properly or not setting properly. I've tried several things. Here's the relevant code.[code]
I see in a book how to use javascript functions from radio buttons to display text into a form textbox, but what I want to do is instead of display text into a textbox, to display images positioned by CSS. My code is below. All I get is the initial display of radio buttons, the chosen one chosen, and that's it. No display of images. I tried even just using text and no. Here's my code:
Im trying to configuere a form that a.a radio buttons that allow the user to choose between quarters, nickels, dimes and pennies and show image when click on my radio button.how to get the image to display whenthey click on the radio button?
I have a set of radio buttons each with an onclick event that has a numeric value. When the button is clicked an input box called "Total" is updated with the new value. The problem I'm having is that if a radio button is checked and one clicks on it again then the onclick event is triggered.
Is there any way to prevent the onclick event from triggering if the radio button is already checked?
I have 3 radio buttons with the same name ("myradio"). The value of each is a different URL (eg. value="http:[url]...)I have a link underneath these (<a href="#">Send</a>). I would like the selected radio button's value to be inserted into the href of the link, and if the user selects a different radio button that this changes.
I have a form with 4 radio buttons, the scenario is, when a user click on a radio button a hidden content will be displayed and the other three radio buttons will be disabled so that at one time a user can only click and view single radio button and the hidden content.Here is my code to show hide the hidden content but i need when the user select one radio button the other radio buttons should disable.
what i need to do to add all the radio botton and check box. i already finish the add formula on the checkbox but i do not know how to add the two selected radio buttons to my checkbox buttons.for example:
I want my radio buttons to become submit buttons as well. So when a user clicks on a radio button it submits the action and refreshes the page accordingly. As of now using only using onclick="this.form.submit()" the page only refreshes with no change. Here is a copy of the entire form. It is a custom shipping options form (I did not create it).
I am trying to use the jquery radio buttons and everything looks well until I press the submit button.What is passed on in my POST variable for the radio buttons is the string "on" and not at all the name of the button. All of the buttons just returns "on".[URL]
I've seen several messages in this group with this question and no reply. Simply stated, how do you send the status of a group of radio buttons to a JavaScript function? I have a large project that needs this. Since I cannot figure it out, I wrote a small page to experiment with it. Here it is....
i have a list of 10 radio buttons all with the same ID=R100 i need a javascript to select (checked) say the 4th radio button AFTER the form is created.
I am trying to set a radio button by a textbox value and also have the radio button be able to set the textbox. So the user can either select a radio button or enter in the text. Is there a simple way to make this happen? Here is what I have so far, which sets the radio button value in the text box. setting the textbox value to the radio button.
<HEAD> <script> var number=""; function getRadios(what){
everything works up until the if(uscan == "n") so idk why it cant find what the value of the field is, because ive tested it and it seems to know even know what the value is.
I have 2 groups of radio buttons..I can manage to make one set be disabled via a selection.. but i can only get this right with the VALUE...Is it possible to use the radio id to do the same?Just use the link below for they jquery
I'm trying to implement a sort of login system with a small difference; instead of the traditional "enter username and password" code, I was wondering if it was possible to click on a radio button option for the username followed by a password?
It was either this or something a lot simpler where you don't need to type in as a username at all, just a password.
I added a photo to show a small mockup of what I want to achieve.
I have created a site that uses the ajax coding to go to the php page retrieve session data from a stored text file and return an array to the javascript. I then parse through the data in the array and fill in the text fields of the form using something like document.getElementById(fieldNameID).value; which of course works great for textboxs and dropdowns but now I have a set of radio buttons and they are also saved in the text file and when it is being returned they are not checking the right one. I am not sure what I am missing here is the code that populates the text fields Code: