• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Javascript not updating screen display

Javascript not updating screen display 13 years 2 months ago #12885

I need to change the values of some of the elements of my form depending on a combination of radio buttons and checkboxes check.
My script actually changes the values (as viewed in webmaster developer addon in Firefox) but the screen display does not change.
Script:
<script type="text/javascript">
function updatePrice()
{
  var form = document.getElementById('userForm');
  var fee0 = document.getElementById('fees0');
  var fee1 = document.getElementById('fees1');
  var fee2 = document.getElementById('fees2');
 // element in question which is a text box.
  var total = form.total;
  var pptotal = document.getElementById('rsfp_Product');
  var concession = document.getElementById('concession0');
  if(fee0.checked)
  {
    total.value = '358.00';
    pptotal.value = '358.00';
  }
  else if(fee1.checked)
  {
    if(concession.checked)
    {
      total.value = '358.00';
      pptotal.value = '358.00';
    }
    else
    {
      total.value = '398.00';
      pptotal.value = '398.00';
    }
  }
  else if(fee2.checked)
  {
    if(concession.checked)
    {
      total.value = '398.00';
      pptotal.value = '398.00';
    }
    else
    {
      total.value = '488.00';
      pptotal.value = '488.00';
    }
  }
 
 
}
</script>
I would greatly appreciate any pointers to what I have or haven't done and how I can make this work.
BTW I love this component, still discovering it's power.
Geoffrey
The administrator has disabled public write access.

Re:Javascript not updating screen display 13 years 1 month ago #12898

Hi Geoffrey:

How are you firing the script? Have you linked to "onchange" events in the radio buttons or checkboxes?

CM
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!