regform
HTML
<form action="https://extended.humboldt.edu/ee/html/register/reg.php" method="post" enctype= "x-www-form-encoded" name="registration" id="registration" >
<table> <th height="0" colspan="3" id="dutch" headers="selection classtitle" ><h4><strong><em>DUTCH</em></strong></h4></th>
</tr>
<tr>
<td height="1" colspan="2" headers="selection classtitle dutch" id="dutchselection"><div style="margin-left:24px">
<p>
<input type="radio" name="language" required id="dutch_EENCx075_27745" onClick="total();" value="dutch_EENCx075_27745" alt="Select for Dutch, EENCx075">
<strong class="coursetitle">DUTCH LANGUAGE </strong> (27745, $75 for 5 months subscription)</p>
<p><em>If you want credit, please check the option below in addition to the above:</em><br>
<input type="radio" name="credit" id="dutch_WLC110_27750" onClick="total();" value="dutch_WLC110_27750" alt="Select for credit in Dutch, WLC110">
<strong class="coursetitle">CREDIT for DUTCH</strong> (1 unit, WLC 110, 27750, $275 additional)</p>
</div></td>
<td width="210" id="dutchfee" headers="selection classtitle dutch dutchselection"><p>$
<input name="dutch_EENCx075_27745_subtotal" size="10" type="text" readonly alt="Fee for Dutch, EENCx075" />
<br>
<br>
$
<input name="dutch_WLC110_27750_subtotal" size="10" type="text" readonly alt="Fee for credit in Dutch, WLC 110" />
</p></td>
</tr>
<tr>
<th height="0" colspan="3" id="esl" headers="selection classtitle" ><h4><strong><em> ESL (English as a Second Language)</em></strong><br>
</h4></th>
</tr>
<tr>
<td height="1" colspan="2" headers="selection classtitle esl" id="eslselection"><div style="margin-left:24px">
<p>
<input type="radio" name="language" required id="esl_EENCx075_27745" onClick="total();" value="esl_EENCx075_27745" alt="Select for ESL,...
CSS
table {
border-collapse: collapse;
border-spacing: 0px;
background-color: #F1EBDD;
}
td {
vertical-align: top;
padding: 9px;
border: medium solid #FFF;
}
th {
vertical-align: top;
padding: 9px;
border: medium solid #FFF;
text-align: center;
}
JavaScript
function total()
{
var total=0;
var reg=0;
if (window.document.registration.dutch_EENCx075_27745.checked) {
reg=reg+75; window.document.registration.dutch_EENCx075_27745_subtotal.value=75;
} else {window.document.registration.dutch_EENCx075_27745_subtotal.value = ""; }
if (window.document.registration.dutch_WLC110_27750.checked) {
window.document.registration.dutch_EENCx075_27745.checked = true;
reg=reg+232; window.document.registration.dutch_WLC110_27750_subtotal.value=232;
reg=reg+75; window.document.registration.dutch_EENCx075_27745_subtotal.value=75;
} else {window.document.registration.dutch_WLC110_27750_subtotal.value = "";}
if (window.document.registration.esl_EENCx075_27745.checked) {
reg=reg+75; window.document.registration.esl_EENCx075_27745_subtotal.value=75;
} else {window.document.registration.esl_EENCx075_27745_subtotal.value = ""; }
if (window.document.registration.esl_WLC110_27751.checked) {
window.document.registration.esl_EENCx075_27745.checked = true; //automatically checks the corresponding EENC language section if not already checked
reg=reg+232; window.document.registration.esl_WLC110_27751_subtotal.value=232;
reg=reg+75; window.document.registration.esl_EENCx075_27745_subtotal.value=75;
} else {window.document.registration.esl_WLC110_27751_subtotal.value = ""; }
total = total + reg;
window.document.registration.amount1.value=total.toFixed(2); //display the grand total.
}