Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Focus on textfield when loading JSP  RSS feed

 
age spets
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is using tha <a> tag and have figured out one easily can tab through the textfields after one have got the focus. The question is how to gain focus on one element when loading the page?
info:Looking for a similar code as the requestFocus() does for java, but for JSP`s. Is there anything, or do I need to call a javaprogram to do this?
 
Sateesh Kumar K
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In the body onLoad call a Java Script function which sets the focus to that Test Box..
I tried sending a sample piece of code . But i couldn't submit the reply with that code. If you want let me know your mail id..
- Hope this will help..
Sateesh
 
Brian Glodde
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the bottom of your JSP:
 
age spets
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thx Brian!
This worked well. Is in doubt if this only helps for IE. But will test it in netscape as soon I get the chance.
yours Age
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!