Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setting focus to included element  RSS feed

 
Todd Buell
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to set the focus to an element of an included JSP in a higher level JSP but can't seem to figure out how. The element in the lower level JSP isn't named, so I believe I can't do a element.setFocus() call. Unless I would use the property field to access it?

Would I be able to perform this sort of call in the jspInit()?

Thanks,
Todd
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
focus() is a javascript client-level concept and has nothing to do with how you format your JSPs. Regardless of how many includes you perform, the result of all the JSP activity on the server results in a single HTML page being sent to the client.

So, you need to arrange your focus() call in such a way that makes sense on the resulting HTML page.

Moved to the HTML/Javascript forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!