Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes Spooky tabindex problem... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Spooky tabindex problem..." Watch "Spooky tabindex problem..." New topic
Author

Spooky tabindex problem...

A Harry
Ranch Hand

Joined: Jan 23, 2002
Posts: 124
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

Joined: Feb 05, 2003
Posts: 4725

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.


A good workman is known by his tools.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4118
    
    2

I believe the html:form tag has a focus attribute that will let you specify which field should receive initial focus.


Junilu - [How to Ask Questions] [How to Answer Questions] [MiH]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Spooky tabindex problem...
 
Similar Threads
errorStyleClass
Setting tab-index using scriptlet in html:text
How to Use bean:write inside html:text
tabIndex in Ratio Button
TabIndex in radiobox