Well I fixed it, I had to use:

$(this).attr("checked")

to get the value.  Should I have known this?


On Sep 19, 2:48 pm, Namlet <[EMAIL PROTECTED]> wrote:
> Why does this line of code not work for the radio button?
>
> if ($(this).attr("type") == "radio") alert($(this).checked);
>
> I get 6 alert boxes (I have 6 Radio Buttons) and the alert says
> undefined every time.  But half of them should be true and half should
> be false.  Am I doing something wrong?
>
> here are two of the radios:
>
> <input name="recvd_loan" type="radio" value="1" /> Yes
> <input name="recvd_loan" type="radio" value="0" /> No
>
> Thanks!

Reply via email to