Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem on getting values from a radio buttons group

Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all in the forum!
I'm trying to develop a module for an aplication and i'm basing on an example from the jquery ui dialog

But i'm using radio buttons and a datepicker field but problems occur when i try to add a second row to the table. It just adds the date value but the "motivo" value don't.
I mean everything works fine at the first attempt but at the next it fails.

Here is part of my code:

I think the problem could be because i'm using a radio group with this function.
When i do the first attempt to add something works fine but if i then add another row i don't get value of the radio button.
With this : $( "input[@name='motivo']:checked").val(); i'm trying to get the value from the radio button group which works fine the first time and i get this(using firebug)
[input#motivo1 1,input#motivo2 2,input#motivo3 3] but the next attemp i get just this [input#motivo1,input#motivo2,input#motivo3].

And this the html

But i don't know why works only one time.
Colud someone help me?
Posts: 67451
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code overload. Pare the problem down to the smallest snippet that demonstrates the issue.
Posts: 15385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are adding a radio button with no name, ho are you suppose to reference it by the name?

I child proofed my house but they still get in. Distract them with this tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic