[jQuery] Re: Best way to toggle a form field value

2008-08-21 Thread FrenchiINLA
$('a').click(function(){$('input[name=' + this.id+ ']').val(!$ ('input[name=' + this.id+ ']').val())});// On Aug 21, 7:02 am, Andy Matthews [EMAIL PROTECTED] wrote: I'm storing a boolean in a hidden field, and I'd like to flip it's value when someone clicks a link. Here's the function I've got

[jQuery] Re: Best way to toggle a form field value

2008-08-21 Thread Andy Matthews
Anyone have input on this? This code runs, but it doesn't seem to want to toggle the value of the form field at all. It changes it once, then continues using the same value. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Thursday, August 21,