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

html:radio

 
Arya Devan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
dnyan ginde
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Arya Devan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic