Hi,
I have a page which I would like frequently reloaded into the browser and was going to use javascript. The issue is that using Tiles I only have the on-load event available for the layout.jsp file and I only want one of my pages to have this functionality.
Is there a work-around?
Here is the simplest thing I've found, from Simon Willison:
function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } }
full writeup at: http://www.sitepoint.com/blog-post-view.php?id=171578
It wouldn't be too hard to extend this so that you could use one function to add both onload and onunload events, should that be valuable. In this case, you don't even specify an onload attribute in your <html> tag. If you do, it would override anything set using this mechanism.
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]