I'm trying to add a button that will update the value of a form field with some text followed by the contents of another field. Here's what I got:
[html]
<form action="<?php echo ($_SERVER['PHP_SELF']); ?>" method="post" name="foo">
{...snip...}
<p>
<b>Item to list on printout:</b>
<input type="text" name="item" size=40 maxlength=80 /></p>
<p><input type="checkbox" name="fl" value="1" CHECKED />
Your order is currently
<input type="text" name="status" size="30" maxlength="60" value="backordered" style="background-color:#ebecfe" />
<input type="button" name="bar" value="Held up waiting on" onClick="document.foo.status.value='held up waiting on' " />
[/html]
I'd like the msg on line 12 to be: 'held up waiting on' . document.foo.item.value
but I don't know how to do that in javascript in a onClick setting.
Thanks in advance,
- Dave (user404)