|
|
 |
|
|
Pages: 1
assigning function to radio in javascript
(Click here to view the original thread with full colors/images)
Posted by: madman55
I am having trouble assigning a math function to a radio button.
This is what i want:
sum function= theSum()
diff function= theDiff()
*= radio button
-------------------------------------------------------------------
1st value:____
2nd value:_____
*add
*subtract
button:calculate
total value_______
basically I want to be able to assign the add function to the add radio and the subtracting function to the subtract radio. The purpose of this is to allow the user to choose either add or subract and then hit the calculate button to get a value from the two integer values.
The problem is how to assign each function to a different radio. I know a conditional is involved in this process, but I don't know how to do it. And the website tutorials don't help at all with this problem. Don't bother giving me a link to a website that might help since chances are they're not of help at all. I'm sure at least a moderator or canis lupis would be able to help me on this one given they are advanced in javascript.
Posted by: AltronHGX
hey how's that problem comin along, dogg, I just wanted to add my two cents and say the best way to do what you're describing is
-snip-
edit: oops, you were banned
Posted by: FadedMaster
Quote:
|
Originally Posted by AltronHGX
hey how's that problem comin along, dogg, I just wanted to add my two cents and say the best way to do what you're describing is
-snip-
edit: oops, you were banned 
|
Hahaha. :-D
|
|
|
|
|