I want the person to click the button 1 to automatically select radio 2 , thus preventing the user from doing two clicks.
How can I do this?
Note:Thesamethingwillhappenalsowhenselectinganotherpaymentmethod.
Page link:
I tried to use this example of the guy above, but checked is giving null !!!
Where am I going wrong?
<script type="text/javascript">// true = selecionar ~ false = deselecionar
function um(){
document.getElementById('payment_method_iugu-credit-card').checked = true;
document.getElementById('payment_method_iugu-bank-slip').checked = false;
document.getElementById('payment_method_wc_ticket_installments').checked = false;
document.getElementById('payment_method_pagseguro').checked = false;
}
function dois(){
document.getElementById('payment_method_iugu-credit-card').checked = false;
document.getElementById('payment_method_iugu-bank-slip').checked = true;
document.getElementById('payment_method_wc_ticket_installments').checked = false;
document.getElementById('payment_method_pagseguro').checked = false;
}
function tres(){
document.getElementById('payment_method_iugu-credit-card').checked = false;
document.getElementById('payment_method_iugu-bank-slip').checked = false;
document.getElementById('payment_method_wc_ticket_installments').checked = true;
document.getElementById('payment_method_pagseguro').checked = false;
}
function quatro(){
document.getElementById('payment_method_iugu-credit-card').checked = false;
document.getElementById('payment_method_iugu-bank-slip').checked = false;
document.getElementById('payment_method_wc_ticket_installments').checked = false;
document.getElementById('payment_method_pagseguro').checked = true;
}</script>
<div class="textopagamento"><h3>Pagamento</h3></div>
<ul class="abapagamento nav nav-tabs">
<li ><a id="bot-um" onclick="um()" href="#divhideiugu-credit-card">Cartão S/ Juros</a></li>
<li ><a id="bot-dois" onclick="dois()" href="#divhideiugu-bank-slip">Boleto à Vista </a></li>
<li ><a id="bot-tres" onclick="tres()" href="#divhidewc_ticket_installments">Boleto Parcelado </a></li>
<li ><a id="bot-quatro" onclick="quatro()" href="#divhidepagseguro">Pag Seguro</a></li>
</ul>
</div>