This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onload function in tiles

 
Shyam Sunder
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends,

my requirement is onload of page. The application should perform some validations.
we are using struts tiles, i want to load the function to call that so pls help
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's important to realize that when you use tiles, each JSP used in the tiles template becomes a page fragment, and is no longer a complete page. For this reason, using the onload event just isn't a very good option for tiles. My suggestion would be to just put the JavaScript code inline with your HTML (not a function definition, but acutal, executable JavaScript). That way it will execute when the page loads and will work similar to using the onload event.
[ August 21, 2007: Message edited by: Merrill Higginson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic