Forum Moderators: open
<tr>
<td><div align="right">Address for invoices:</div></td>
<td><input name="InvoiceEmail" type="text" size="40" value="" onkeyup="compare();" id="InvoiceEmail" /></td>
<td></td>
</tr>
<tr>
<td><div align="right">Please re-enter address:</div></td>
<td><input name="ValInvoiceEmail" type="text" size="40" value="" onkeyup="compare();" id="ValInvoiceEmail" /></td>
<td>
<script type="text/javascript">
var first=document.getElementById('InvoiceEmail').value;
var second=document.getElementById('ValInvoiceEmail').value;
if (parseStr(first)!=parseStr(second)) {
document.write("Error");
} else {
document.write("Okay")
};
//alert('E-mail addresses must match!');
</script>
</td>
</tr>
<input name="InvoiceEmail" type="text" size="40" value="" onkeyup="compare();" id="InvoiceEmail" />
<input name="ValInvoiceEmail" type="text" size="40" value="" onkeyup="compare();" id="ValInvoiceEmail" />
<script type="text/javascript">
var first=document.getElementById('InvoiceEmail').value;
var second=document.getElementById('ValInvoiceEmail').value;
if (parseStr(first)!=parseStr(second)) {
document.write("Error");
} else {
document.write("Okay")
};
//alert('E-mail addresses must match!');
</script>
function compare() {
var first = document.getElementById('InvoiceEmail').value,
second = document.getElementById('ValInvoiceEmail').value,
result = document.getElementById('EmailCompareResult');
if (parseStr(first) != parseStr(second)) {
result.innerHTML = 'Error';
}
else {
result.innerHTML = 'Okay';
}
}
function compare() {
var first = document.getElementById('InvoiceEmail').value,
second = document.getElementById('ValInvoiceEmail').value,
result = document.getElementById('EmailCompareResult');
result.innerHTML = (parseStr(first) != parseStr(second)? 'Error': 'Okay');
}