Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Why Doesn't My Code Work?

$
0
0

I am trying to make it so if a user checks a radio button within a group of 2 (Choice1 & Choice2) the formula within the field "Total" changes.

 

This is the javascript within the field "Total"

 

//////////////////////////////////////////////////////////////////////////////

if(document.Group1('Choice1').checked)

{

event.value = (this.getField("WSAtotal").value + this.getField("SAandAdd").value);

}


else if(document.Group1(Choice2').checked)

{

event.value = (this.getField("NSAtotal").value + this.getField("SAandAdd").value);

}

//////////////////////////////////////////////////////////////////////////////

 

P.S. I don't know anything about javascript so I have just been Frankensteining this code from around the web.


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>