Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery validation and radio buttons

 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just stumbled upon another one: This time with the radio buton. The rendered HTML is as follows:



I can clearly see that the problem is because of the fact that both has the same name. But I can't help it as the server side code would like below;



Now this really needs a work around.


 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the rendered screenshot and by the way this validator plugin is really cool.

HtmlOutput.png
[Thumbnail for HtmlOutput.png]
 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oopss.... I guess I enough polluted the other topic. Good that you spun this off into a new one.

All right, do you have some clues for me on this one?
 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Made some progress. But now the error message is not displayed at all.



I also have added the following to my css:


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64844
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Radio buttons must have the same name to be part of the same radio group.

 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. Got rid of the problem:

My Struts tag looks like:



My validate method for jQuery looks like:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic