Hi All,
I have a webpage that has some controls enclosed within div id tags. My problem is when I try to set focus() on a control withing that tag, I get null or not an object error. focus() works fine when not using div id tag. Do I have to reference the id name? If so, how do I do that?
HTML Code:
JS Code:
Any help would be appreciated.
TIA,
Tim
I have a webpage that has some controls enclosed within div id tags. My problem is when I try to set focus() on a control withing that tag, I get null or not an object error. focus() works fine when not using div id tag. Do I have to reference the id name? If so, how do I do that?
HTML Code:
Code:
<div id="amountRange">
<table>
<tr>
<td><span class="style4"><input type="checkbox" name="amountRange">
Amount Range:</span></td>
<td><span class="style4"> Minimum:</span></td>
<td></td>
<td><input name="amtFrom" onchange="chkMinAmount('ACHCustomRptForm')" size="13" maxlength="13"
style="HEIGHT: 22px; WIDTH: 133px" value="0.00"></td>
</tr>
</table>
</div>
JS Code:
Code:
function chkMinAmount(frmName) {
var tempNum = eval('document.' + frmName + '.amtFrom.value');
if (amountCheck(tempNum)) {
alert("Enter positive numbers only.");
eval('document.' + frmName + '.amtFrom.focus()');
}else {
var newValue = formatNumber(tempNum);
eval('document.' + frmName + '.amtFrom.value = newValue');
}
}
Any help would be appreciated.
TIA,
Tim