• 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: Reset dropown on change

Reset dropown on change 8 years 9 months ago #31860

  • qwazerty
  • qwazerty's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hello !

I would like to reset some dropdowns (selected by ID) when I change an other dropdown.
I have conditional fields and a calcul so I need empty fields for a good calcul.

To be clearer :
Dropdown 1
Choice 1
Choice 2
Choice 3

Dropdown 2
Choice 1.1
Choice 1.2
Choice 1.3

If I selected choice 1.3, the total of my calcul is 999€
However, if I choose Choice 2, Dropdown 2 is hidden and Dropdown 3 is Display. So, I need to emty Dropdown 2 to have a total = 0.

I would like to use JavaScript.
In my dropwdown 1 : Additionnal attributs : onchange="reset_dropdown()"
In JavaScript textarea :
<script>
function reset_dropdown(){
document.getElementById("Dropdown2").val("0");
}
</script>

I also try :
<script>
function reset_dropdown(){
document.getElementById("Dropdown2").reset();
}
</script>


But it does not work !

Someone to help me ?

Thanks in advance,
Regards !

Laurine
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!