jQuery in Action, 3rd edition
The moose likes Struts and the fly likes onload function in tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "onload function in tiles" Watch "onload function in tiles" New topic

onload function in tiles

Shyam Sunder

Joined: Dec 23, 2006
Posts: 24
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

Joined: Feb 15, 2005
Posts: 4864
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 ]

Consultant, Sima Solutions
I agree. Here's the link: http://aspose.com/file-tools
subject: onload function in tiles
It's not a secret anymore!