This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes jQuery validation and radio buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery validation and radio buttons" Watch "jQuery validation and radio buttons" New topic
Author

jQuery validation and radio buttons

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

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.



SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Here is the rendered screenshot and by the way this validator plugin is really cool.



[Thumbnail for HtmlOutput.png]

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

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

Joined: Sep 26, 2006
Posts: 9345
    
    2

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

Joined: Jan 10, 2002
Posts: 60816
    
  65

Radio buttons must have the same name to be part of the same radio group.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

OK. Got rid of the problem:

My Struts tag looks like:



My validate method for jQuery looks like:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jQuery validation and radio buttons
 
Similar Threads
jQuery select option
How to "enable/disable" radio button in struts2 on click of check box
html:radio..
Using JSTL Data Displayed In Browser Is Getting Fixed To 24576 Bytes(24 KB)
Radio Validator