<form>
     <input type="hidden" name="mysteryText" ide="mysteryText" />

     <button value="1"
onclick="this.form.mysteryText.value=this.value;">Foo</button>
     <button value="2"
onclick="this.form.mysteryText.value=this.value;">Bar</button>
</form>

if you want the form to submit on the button click, do this instead:

<button value="1" onclick="this.form.mysteryText.value=this.value;
this.form.submit();">Foo</button>
<button value="2" onclick="this.form.mysteryText.value=this.value;
this.form.submit();">Bar</button>

On 12/20/06, Les Mizzell <[EMAIL PROTECTED]> wrote:
> Charlie Griefer wrote:
> > sounds like more of a reason to go the kludgy JS route and populate a
> > hidden form field onclick prior to submit :)
>
> Got a link pointing to how to do this? I suck at javascript...
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264684
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to