this??? $(this).attr("name")
On 6/15/07, Andrew B <[EMAIL PROTECTED]> wrote:
I'm a raw newbie but have not found this particular question answered. I have a series of dynamically generated radios each of which has three possible values Y (yes) N (no) and M (maybe) and want to capture mouse clicks and act on them depending on the value for example <td><input type="radio" name="Radio1" id="Radio1Y" value="Y" CHECKED></ td> <td><input type="radio" name="Radio1" id="Radio1N" value="N" ></td> <td><input type="radio" name="Radio1" id="Radio1M" value="M" ></td> The following code placed in the ready function works fine. $('input').filter(':radio').change( function() { if ($(this).val()=="Y") $('#alert').text("val was yes for " ); else if ($(this).val()=="N") $('#alert').text("val was No"); else $('#alert').text("val was Maybe"); But what I want to do is pass to the name of the radio in the text line (or ultimately to a php for acting upon). Ultimately what I am seeking to do is to pass the value and the name of the control to the PHP which will execute some SQL and return an OK Ideas?
-- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com