I have an assignment in which the person has to choose their department and their hourly wage is given for each department. In the text box they must put their hours worked for the week, which I can't seem to get to work this is what I have:
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....
This is probably simple, but I am new to jQuery and am trying to wrapmy head around things.Basically what I am trying to do is a very basic quiz. I have 3 groupsof radio buttons (3 questions with 4 possible answers for eachquestion, so.. multiple choice).Each answer has a number value assigned to it, i.e. value="2". Thiswould be 2 points.After pressing a button I need to be able to select all the radiobuttons have that been checked, and then add all their point values upand give the user a score.
User selects radio buttons and the script totals a score based on the selection.Problem: The script returns no value as a total. The script was originally written to total a score by matching input name values beginning with "Set" (i.e., Set1, Set2). At that time the script worked; returning a sum of the selected radio button values. A requirement has mandated changing the names (i.e., EXTFLDV _ 500048). The new name values are not contiguous. I believe this is where the problem may lie.
Script: function setRadios() { function sumRadios()[code]..........
so basically this is what I have its 2 sets of radio buttons named budget, premier and superior which values are $2,$3 and $5 respectively. a checkbox that if checked the value would make the the first group of radios multiplied by 2 if not it will remain the same the second group would be weekly, monthly and annually which the values will be multiplied to 1,x(52/12) and 52 respectively to everything above. the total would be displayed as an alert message if the none of the first group is selected an alert would be issued when calculate is pressed and that would be please select level of cover and if none of the second group is selected it would display please select frequency of payment but if none is selected at all both alerts would be displayed on a single dialogue box, i cant make a script to make it function properly .i didnt include the script because i suck it doesnt work
<form name="InsuranceCalc"> <p><h2>calutaling insurance</h2></p> <p> Please complete the form.</p>[code].............
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 am looking to build an expenditure calculator. What I am having problems with is I am using radio buttons to multiply form field values [radio1] = x 1 (week) [radio2] = x 4 (month) [radio3] = x 52 (year) So if you fill out a field and select [radio2] it multiplies the field by 4. If you then select [radio1] it reverts to the original value. Using JQuery what's the best way to do this. The issue I am having is I need to know the previous selected radio as well as the new one so I know whether to divide or multiply.
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?
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 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.
I need help in calculating a score from a row of drop-down values. I need to use the onChange to tally the score as the user moves across 9 categories (with drop-down selection of 1-9 or N/A) multiplied by a weighted score. The final column for each employee would be the calculated score. I know how to accomplish this with vbscript but I need it to process on the screen so the user can see the calculated score as they make selections. Also the code needs to execute as many times as there are employee rows.(loop) I don't know how to do this with Javascript
Here's the VBscript with the variables involved Var S1 = Category 1 Weighted score Var S2 = Category 2 Weighted score Var S3 = Category 3 Weighted score Var S4 = Category 4 Weighted score Var S5 = Category 5 Weighted score Var S6 = Category 6 Weighted score Var S7 = Category 7 Weighted score Var S8 = Category 8 Weighted score Var S9 = Category 9 Weighted score D5 = 0.92 Var Q11 = Category 1 drop-down Value(1-9) * S1 Var Q22 = Category 2 drop-down Value(1-9) * S2 Var Q33 = Category 3 drop-down Value(1-9) * S3 Var Q44 = Category 4 drop-down Value(1-9) * S4
If (Category 5 Value = "N/A") THEN Q55 = ' ' Else Var Q55 = Category 5 drop-down Value(1-9 or N/A) * S5 End If
Var Q66 = Category 6 drop-down Value(1-9) * S6 Var Q77 = Category 7 drop-down Value(1-9) * S7 Var Q88 = Category 8 drop-down Value(1-9) * S8 Var Q99 = Category 9 drop-down Value(1-9) * S9
If (Category 5 = "N/A") THEN Var FinalScore = round(((Q11 + Q22 + Q33 + Q44 + Q66 + Q77 + Q88 + Q99) / D5),2) else Var FinalScore = round((Q11 + Q22 + Q33 + Q44 + Q55 + Q66 + Q77 + Q88 + Q99),2) end if
I have a slight problem with creating dynamic quotes. Basically I have two select boxes and need to calculate a total in real-time using javascript and insert into input.First it needs to explode out the machine price and term years from the values and then calculate.
Here an example: A machine costs �4000 and a term of 2 years(60 months). The calculation would be (4000/60)*3 = �200
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:
Well, it's been a while since I last visited CF, but I'm finally back and, for the life of me, am drawing a total blank on something that seems like it should be fairly easy to handle.
The Math.sqrt() function works just fine if all a person needs is the Square Root of a number, but what about needing the Cube Root or even a 4th Root of a number?
My first instinct was to use the Math.pow(x,y) function with a negative value for "y." For instance;
var z=Math.pow(27,-3)
This should return a value of 3. Unfortunately, this doesnt seem to work when I tested it through the W3 reference pages, so I am looking for a clue as to how I might go about finding such values, or if it is even possible through Javascript.
calculating the summed values of a column. Also, the row values are subtracted from each other eg:
col1 col2 col3 row1 a b = a-b row2 c d = c-d row3 =a+c =b+d =a-b+(c-d)
however there can be N number of rows. I have listed below and example I have done to calculate the subtracted values but I am having difficulty doing the summations.
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 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