• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spooky tabindex problem...

 
A Harry
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using struts 1.1, IE 5.5 (sp2)
I have several <html:text> fields but for some reason the "tabindex" property refuses to work.
The first field is -
<html:text property="projectfullcode" size="4" maxlength="4" tabindex="1"/>
When the page is first displayed you cannot tell where the focus is, press tab once & it goes to the address bar, again then it goes to "projectfullcode".
What am I doing wrong? - probably something really stupid! - any ideas?
thanks
harry
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the autotab is not the same as setfocus. autotab is simply a way to select the ORDER that fields go through when tabbed. Initially, no field on the page has focus unless you specify it. I don't know if there is a way to set focus without javascript, off-hand. Someone else may know.
 
Junilu Lacar
Bartender
Posts: 7606
54
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the html:form tag has a focus attribute that will let you specify which field should receive initial focus.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic