THIS WORKS:

<html><head><script type="text/javascript">
function recalc() {
alert ('Entering recalc().');
}
</script></head><body>
<form><input name="tf_addr" id="tf_addr" type="text"></form>
<script type="text/javascript">recalc()</script>
</body></html>


THIS WORKS:

<html><head><script type="text/javascript">
</script></head><body>
<form><input name="tf_addr" id="tf_addr" type="text" onchange="alert('onchange works fine')"></form>
</body></html>


BUT THIS DOESN'T WORK:

<html><head><script type="text/javascript">
function recalc() {
alert ('Entering recalc().');
}
</script></head><body>
<form><input name="tf_addr" id="tf_addr" type="text" onchange="recalc()"></form>
</body></html>


The first example works, which shows that the recalc function can be called. The second example works, which shows that onchange will trigger an alert box. BUT, the third example doesn't work. Why can't I trigger a call to the recalc function from the onchange event?

The above 3 code postings are the entire programs. Nothing has been left out or modified.

I am using IE 8.0.6001.18702.

I am sure the solution is simple enough, but I'm just not seeing it. Can anyone out there help me?