jthunder
01-07-2012, 12:00 AM
I have this javascript on top of my HTML codes, that enables the "Free Trial" button if the Checkbox=On.
but since I am not a programmer, I need a good mind to help me edit this
What I need is to Edit this so that,
If focus on Voucher Code field and have at least 6 bytes entered, and also the CheckBox=ON, I want the "Trial" button to change to "Confirm".
<script language="Javascript" type="text/javascript">
function enable(){
if (document.agreement_form.agreed.checked==''){
document.agreement_form.submit_button.disabled=true
}else{
document.agreement_form.submit_button.disabled=false
}
}
</script>
<div style="float:right;width:200px;margin-left:15px;padding-left:15px;margin-top:15px;border-left:2px dotted #99CC00">
<span style="font-weight:bold;font-family:Tahoma;font-size:10pt;">Voucher Code:</span><br/>
<form style="font-family:Tahoma;font-size:8pt;" method="GET" action="$authaction" name="agreement_form">
<input name="tok" value="$tok" type="hidden"/>
<input name="redir" value="$redir" type="hidden"/>
<input size="12" name="voucher" type="password"/>
<button type="SUBMIT" disabled="disabled" name="submit_button"><strong> Free Trial </strong></button>
<p>
</p>
<input name="agreed" onchange="enable()" type="checkbox"/> Signed & agreed to all terms and conditions.
</form>
but since I am not a programmer, I need a good mind to help me edit this
What I need is to Edit this so that,
If focus on Voucher Code field and have at least 6 bytes entered, and also the CheckBox=ON, I want the "Trial" button to change to "Confirm".
<script language="Javascript" type="text/javascript">
function enable(){
if (document.agreement_form.agreed.checked==''){
document.agreement_form.submit_button.disabled=true
}else{
document.agreement_form.submit_button.disabled=false
}
}
</script>
<div style="float:right;width:200px;margin-left:15px;padding-left:15px;margin-top:15px;border-left:2px dotted #99CC00">
<span style="font-weight:bold;font-family:Tahoma;font-size:10pt;">Voucher Code:</span><br/>
<form style="font-family:Tahoma;font-size:8pt;" method="GET" action="$authaction" name="agreement_form">
<input name="tok" value="$tok" type="hidden"/>
<input name="redir" value="$redir" type="hidden"/>
<input size="12" name="voucher" type="password"/>
<button type="SUBMIT" disabled="disabled" name="submit_button"><strong> Free Trial </strong></button>
<p>
</p>
<input name="agreed" onchange="enable()" type="checkbox"/> Signed & agreed to all terms and conditions.
</form>