var tran = $("input:radio[name='transmission']:checked").val();

On Fri, Dec 12, 2008 at 1:48 PM, Chiste <chi...@gmail.com> wrote:

>
> I have a problem here. No matter which radio a click, I'm always
> getting the value of the firts one. How could I get the value of the
> selected radio?
>
>
> <label><input type="radio" name="transmision" value="1" /> One</label>
> <label><input type="radio" name="transmision" value="2" /> Two</label>
> <label><input type="radio" name="transmision" value="3" /> Three</
> label>
> <label><input type="radio" name="transmision" value="4" /> Four</
> label>
> <label><input type="radio" name="transmision" value="5" /> Five</
> label>
> <input id="continuar" type="button" value="Continue" />
>
> $("#continuar").click(
>        function(){
>                var tran = $("input:radio[name='transmision']").val();
>                alert("tran"); //always returns 1
>        }
> )
>



-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.

Reply via email to