Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- var dropdownProduct = document.getElementById("input_137");
- var paypalProduct1 = document.getElementById("input_116_1006");
- var paypalProduct2 = document.getElementById("input_116_1005");
- var paypalProduct3 = document.getElementById("input_116_1004");
- // Disabling PayPal products selection
- window.onload = function(){
- paypalProduct2.disabled = true;
- paypalProduct3.disabled = true;
- };
- // Corresponding selection from Dropdown to PayPal products
- function makeSelection() {
- if (dropdownProduct.selectedIndex == 1) { // Registering one player option
- paypalProduct1.disabled = false;
- paypalProduct2.disabled = true;
- paypalProduct3.disabled = true;
- paypalProduct1.checked = true;
- } else if (dropdownProduct.selectedIndex == 2) { //Registering two players option
- paypalProduct1.disabled = true;
- paypalProduct2.disabled = false;
- paypalProduct3.disabled = true;
- paypalProduct2.checked = true;
- } else if (dropdownProduct.selectedIndex == 3) { //Registering three players option
- paypalProduct1.disabled = true;
- paypalProduct2.disabled = true;
- paypalProduct3.disabled = false;
- paypalProduct3.checked = true;
- };
- };
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement