Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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
Example


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?
 
Marshal
Posts: 67340
173
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.
 
author
Posts: 15385
6
  • 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?

Eric
 
Pay attention! Tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!