Sponsored Content
Top Forums Programming javascript average from from values in radiobuttons? Post 302608779 by me. on Sunday 18th of March 2012 03:19:22 PM
Old 03-18-2012
javascript average from from values in radiobuttons?

Hi all,

can you please help me with these part of my code, I want to calculate average grade from each module and
not sure if need to label each element there, or is there any easier option to do that?

appreciate your help Image

see my code here:

Code:
        <p id="one" class="hiddenDiv" form name="semester1" action"#"> 
        whats your scores in these modules?</br>
        Web developement:
        <label> <input type = "radio"  name = "web"   
                       value = "fail"  /> 0-39 </label> 
        <label> <input type = "radio"  name = "web"   
                       value = "59" /> 40-59 </label> 
        <label> <input type = "radio"  name = "web"   
                       value = "75" /> 60-75 </label> 
        <label> <input type = "radio"  name = "web"   
                       value = "89" /> 76-89 </label>
        <label> <input type = "radio"  name = "web"   
                       value = "100" /> 90-100 </label>
       </br></br>
     Programming  : 
     <label> <input type = "radio"  name = "pr"   
                       value = "fail"  /> 0-39 </label> 
        <label> <input type = "radio"  name = "pr"   
                       value = "59" /> 40-59 </label> 
        <label> <input type = "radio"  name = "pr"   
                       value = "75" /> 60-75 </label> 
        <label> <input type = "radio"  name = "pr"   
                       value = "89" /> 76-89 </label>
        <label> <input type = "radio"  name = "pr"   
                       value = "100" /> 90-100 </label>
      </br></br>
      Interactive case study: 
      <label>A</label> <input type = "radio"  name = "ics"   
                       value = "fail" /> 0-39 > 
        <label>B</label> <input type = "radio"  name = "ics"   
                       value = "59" /> 40-59 </label> 
        <label> <input type = "radio"  name = "ics"   
                       value = "75" /> 60-75 </label> 
        <label> <input type = "radio"  name = "ics"   
                       value = "89" /> 76-89 </label>
        <label> <input type = "radio"  name = "ics"   
                       value = "100" /> 90-100 </label>    </br>
        <input type = "button"  name = "submit"   
                       onclick=""CALCULATE? ? ? " " value="submit" name="submit" type="submit" />

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to generate Average Values

11.60 12.35 12.49 12.99 13.09 12.91 13.48 14.16 14.18 13.23 13.17 13.15 13.71 13.35 13.12 13.00 12.79 12.83 12.54 12.89 12.89 12.47 12.94 13.00 13.41 13.09 13.09 12.09 12.76 12.93 13.67 13.14 13.01 12.39 12.78 12.86 12.61 12.50 12.11 12.98 12.90 12.77 12.56... (5 Replies)
Discussion started by: gagan.delouri
5 Replies

2. Web Development

Help with passing HTML values in to JavaScript

Not sure if this is the right place to ask this but here goes. I am creating a cheat sheet for co-workers. The concept is that you pick wire size and conduit size and the amount of wires that will fit is displayed. I haven't used alot of drop downs and can't quite figure out the way the get id... (3 Replies)
Discussion started by: zero3ree
3 Replies

3. Shell Programming and Scripting

average of distinct values with awk

Hi guys, I am not an expert in shell and I need help with awk command. I have a file with values like 200 1 1 200 7 2 200 6 3 200 5 4 300 3 1 300 7 2 300 6 3 300 4 4 I need resulting file with averages of... (3 Replies)
Discussion started by: saif
3 Replies

4. Shell Programming and Scripting

print average of values

Is it possible to print the average of 2 nd column based on a key in 1st col input a1X 4 a1X 6 a2_1 10 a2_1 20 a2_1 30 a2_1 30 a2_1 10 output a1X 5 a2_1 20 (11 Replies)
Discussion started by: quincyjones
11 Replies

5. Shell Programming and Scripting

Average of columns with values of other column with same name

I have a lot of input files that have the following form: Sample Cq Sample Cq Sample Cq Sample Cq Sample Cq 1WBIN 23.45 1WBIN 23.45 1CVSIN 23.96 1CVSIN 23.14 S1 31.37 1WBIN 23.53 1WBIN 23.53 1CVSIN 23.81 1CVSIN 23.24 S1 31.49 1WBIN 24.55 1WBIN 24.55 1CVSIN 23.86 1CVSIN 23.24 S1 31.74 ... (3 Replies)
Discussion started by: isildur1234
3 Replies

6. Shell Programming and Scripting

Get the average from column, and eliminate the duplicate values.

Dear Experts, Kindly help me please, I have a big file where there is duplicate values in col 11 till col 23, every 2 rows appers a new numbers, but in each row there is different coordinates x and y in col 57 till col 74. Please i will like to get a single value and average of the x and y... (8 Replies)
Discussion started by: jiam912
8 Replies

7. Shell Programming and Scripting

Calculate average of top n% of values - UNIX

Hey guys, I have several huge tab delimited files which look like this: a 1 20 a 3 15 a 5 10 b 2 15 b 6 10 c 3 23 what I am interested is to calculate the average of top n% of data in third column. So for example for this file the top 50% values are: 23 20 (Please note that it... (11 Replies)
Discussion started by: @man
11 Replies

8. Shell Programming and Scripting

Average values of duplicate rows

I have this file input.txt. I want to take average column-wise for the rows having duplicate gene names. Gene Sample_1 Sample_2 Sample_3 gene_A 2 4 5 gene_B 1 2 3 gene_A 0 5 7 gene_B 4 5 6 gene_A 11 12 13 gene_C 2 3 4 Desired output: gene_A 4.3 7 8.3 gene_B 2.5 3.5 4.5 gene_C 2 3 4... (6 Replies)
Discussion started by: Sanchari
6 Replies

9. Shell Programming and Scripting

Compute average based on field values

Im looking for a way to average the values in field 14 (when field 2 is equal to 2016) and fields 3 and 4 (when field 2 is equal to 2017). Any help is appreciated. 001001 2016 33.22 38.19 48.07 51.75 59.77 67.68 70.86 72.21 66.92 53.67 42.31 40.15 001001 2017 ... (10 Replies)
Discussion started by: ncwxpanther
10 Replies

10. UNIX for Beginners Questions & Answers

Calculate average from a given set of keys and values

Hello, I am writing a script which expects as its input a hash with student names as the keys and marks as the values. The script then returns array of average marks for student scored 60-70, 70-80, and over 90. Output expected 50-70 1 70-90 3 over 90 0 The test script so far... (4 Replies)
Discussion started by: nans
4 Replies
gifpos(1)						      General Commands Manual							 gifpos(1)

NAME
gifpos - A program to change GIF screen size and/or reposition images. No test is made to make sure changes will generate valid GIF files (i.e. images are still confined to screen etc.) USAGE
gifpos [-q] [-s Width Height] [-i Left Top] [-n n Left Top] [-h] gif-file If no gif-file is given, GifPos will try to read a GIF file from stdin. MEMORY REQUIRED
Line. OPTIONS
[-q] Quiet mode. Default off on MSDOS, on under UNIX. Controls printout of running scan lines. Use -q- to invert. [-s Width Height] Set the new screen dimensions, so for example `-s 1000 800' will set screen to width of 1000 and height of 800. [-i Left Top] set image relative to screen position, so for example `-i 100 80' will set image left position to 100 and top position to 80. This sets the position of the first image only. [-n n Left Top] set image n relative to screen position, so for example '-n 3 100 80' will set the third image position as in 2. [-h] Print one line of command line help, similar to Usage above. AUTHOR
Gershon Elber Man page created by T.Gridel <tgridel@free.fr>, originally written by Eric S. Raymond <esr@thyrsus.com> giflib-tools gifpos(1)
All times are GMT -4. The time now is 08:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy