wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "onload function in tiles" Watch "onload function in tiles" New topic
Author

onload function in tiles

Shyam Sunder
Greenhorn

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 ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: onload function in tiles
 
Similar Threads
Defining onLoad() function for a struts tiles page
Checking for a specific value
why onload() in body unable to call out ?
JSP + javasscript
Disabling the alert in child pages-- java script