wood burning stoves*
The moose likes Struts and the fly likes focusing on radio button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "focusing on radio button" Watch "focusing on radio button" New topic
Author

focusing on radio button

Michelle Cox
Greenhorn

Joined: Feb 24, 2004
Posts: 4
Hi, can anyone pls help me figure out how to set focus on a radio button.
I have my body tag defined generically in my tiles layout, and I call mySetFocus() in the onload event.
mySetFocus
{
if(document.forms[0] != null) document.forms[0].elements[0].focus();
}
But this seems to have no effect on radio buttons, although it works for text fields.
Trying to set the focus on every individual page, like
html:form action="/SubmitPage" focus="RadioBtn[0]" causes an error.
Does anyone have any idea what is to be done... Thx.
[ March 01, 2004: Message edited by: Michelle Cox ]
Michelle Cox
Greenhorn

Joined: Feb 24, 2004
Posts: 4
Are my questions too stupid or somethin'.. Why isn't anybody asnwering them???
lee anthony
Ranch Hand

Joined: Jan 23, 2004
Posts: 35
hi beleive u got the answer for ur question
but in addition to the same in focus u put the property name of radiobutton which u have reflected in bean form class
i beleive this will help u,
lee
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: focusing on radio button