[jQuery] Re: Get the ID of a button that is clicked

2009-08-10 Thread Charlie Griefer
this.id On Mon, Aug 10, 2009 at 11:48 AM, Erich93063 erich93...@gmail.com wrote: I have a listing of records on a page and an Edit button for each record. I want to write some jquery that fires when the button is clicked to go to the edit page for the record whose button I clicked. Here is

[jQuery] Re: Get the ID of a button that is clicked

2009-08-10 Thread Erich93063
WOW I thought I tried that. That was my first instinct. I must have had an error somewhere else. That worked. THANKS! On Aug 10, 11:50 am, Charlie Griefer charlie.grie...@gmail.com wrote: this.id On Mon, Aug 10, 2009 at 11:48 AM, Erich93063 erich93...@gmail.com wrote: I have a listing of

[jQuery] Re: Get the ID of a button that is clicked

2009-08-10 Thread Eduardo Pinzon
or script type=text/javascript $(function() { $('#myGroup input:button').click(function(e) { self.location = 'foo.cfm?id=' + $(this).attr(id); }); }); /script 2009/8/10 Erich93063 erich93...@gmail.com WOW I thought I tried

[jQuery] Re: Get the ID of a button that is clicked

2009-08-10 Thread Charlie Griefer
Aye, but I've been reprimanded (on this list) for suggesting that (and incurring the 'overhead' of a jQuery object) when 'this' works just fine :) On Mon, Aug 10, 2009 at 11:56 AM, Eduardo Pinzon edcpin...@gmail.comwrote: or script type=text/javascript $(function() {

[jQuery] Re: Get the ID of a button that is clicked

2009-08-10 Thread Anoop kumar V
Would e.target.id also work in this case? Thanks, Anoop On Mon, Aug 10, 2009 at 3:00 PM, Charlie Griefer charlie.grie...@gmail.comwrote: Aye, but I've been reprimanded (on this list) for suggesting that (and incurring the 'overhead' of a jQuery object) when 'this' works just fine :) On

[jQuery] Re: Get the ID of a button that is clicked

2009-08-10 Thread Eduardo Pinzon
sorry, tanks for tip 2009/8/10 Charlie Griefer charlie.grie...@gmail.com Aye, but I've been reprimanded (on this list) for suggesting that (and incurring the 'overhead' of a jQuery object) when 'this' works just fine :) On Mon, Aug 10, 2009 at 11:56 AM, Eduardo Pinzon