This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes html:radio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:radio" Watch "html:radio" New topic
Author

html:radio

Arya Devan
Greenhorn

Joined: Feb 07, 2006
Posts: 28
hi all... i m using struts html tags. html:radio . cant i have javascript validations on struts html tags with plain action classes... to xplain more i need to attach my code. but i m not allowed to directly attach html code here. can u plz help me in both of these issues??


Arya.
dnyan ginde
Ranch Hand

Joined: Jan 17, 2006
Posts: 68
HI Arya,

Struts html tags provide you with event handling options like onclick, onmouseover etc. One more thing you can attach all your code using the CODE button provided at the bottom of the post. So please feel free the next time to attach your code for better understanding of your problem.
Arya Devan
Greenhorn

Joined: Feb 07, 2006
Posts: 28
hi ... thanx for the reply... but i hav a problem again... wenever i try to enclose my code inside the [CODE} [/CODE] it gives me this error..
wat exactly i hav to do..

Sorry, your post appears to have an illegal HTML tag. Often this is because the post contains a "<" character instead of the equivalent HTML escape sequence "& lt;"
You can fix this by replacing every "<" in your post with "& lt;" (without the internal space). Sometimes the problem is that you're using a specific method name which our system thinks is part of an attempt to insert some evil JavaScript exploit into our pages. The most common is "getkookie()" - just replace this phrase with something else like getKookie(). Sorry for the inconvenience; this is the best we can do for now. It's all Mapraputa's fault.

The specific error message is: ONCLICK
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Javaranch has a filter that prevents posting of onclick and onload within a <> pair. Most of us generally just misspell it as onklick or something like that with the understanding that others seeing the code will know that we're deliberately misspelling to get past the filter.


Merrill
Consultant, Sima Solutions
Arya Devan
Greenhorn

Joined: Feb 07, 2006
Posts: 28
hi ... this is my piece of code..
My problem: i m not able to get the javascript executed with the struts html tag... a plain html tag executes the javascript... i dunno if i hav done any mistake in the coding. plz help..



and the javascript i used was..



i hope these codes are sufficient. plz help me.
thanx in advance.
jakeer ahmed
Greenhorn

Joined: Jan 17, 2006
Posts: 15
Hi Arya you can use the fallowing piece of code for radio buttons script checking:

suppose if ur ActionForm 'formbean' name in struts-config.xml is myform
then



This will work fine if u hav limited radio buttons,
But in case if u have many buttons , u can fallow like this one

 
wood burning stoves
 
subject: html:radio
 
Similar Threads
struts html tag question
To iterate HashMap in struts
Jstl with Struts Html tags
Using Struts Creating the Radio Button for gender
Enabling / disabling forms (Struts)