In article <1112991546.905588.308620@z14g2000cwz.googlegroups .com>,
brian.ackermann@gmail.com enlightened us with...[color=blue]
> Hi,
>
> Can someone tell me what I'm doing wrong here? It makes sense to me,
> but fails to actually execute the code. I can't find anything on
> google, but maybe my search criteria are off.
>
> <input type="text" name="amount" value=<script TYPE="text/javascript">
> roundNumber(number, digits); </script>>
>[/color]
You can't do that...unless you're doing server-side stuff with
value="<%=expression%>"
or similar. Which may be where you got the notion this was even vaguely
possible.
Do this instead.
<input type="text" name="amount" value="">
<script TYPE="text/javascript">
document.formname.amount.value = roundNumber(number, digits);
</script>
Note that "number" and "digits" must be in scope, available at the time it
runs.
--
--
~kaeli~
Murphy's Law #2030: If at first you don't succeed, destroy
all evidence that you tried.
http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace