This content has been marked as final.
Show 4 replies
-
1. Re: execute javascript function on page load
ilya_shaikovsky Sep 10, 2008 6:44 AM (in response to ajanz)will onload handler helps you? ;) There is nothing about RichFaces.
-
2. Re: execute javascript function on page load
ajanz Sep 10, 2008 6:51 AM (in response to ajanz)sorry for stupid question
but where can i define onload? -
3. Re: execute javascript function on page load
nbelaevski Sep 11, 2008 2:50 PM (in response to ajanz)http://snippets.dzone.com/tag/onload
Prototype.js & jQuery libraries are already bundled with RichFaces, use a4j:loadScript to load one if you've decided to use it. -
4. Re: execute javascript function on page load
jazir1979 Sep 11, 2008 7:42 PM (in response to ajanz)There is something to be aware of. If you try to attach events, styles, or anything to elements in the DOM tree in an onLoad() handler, they will all be lost if you ajax reRender those elements.
I was using jQuery to attach behaviour to select boxes in onLoad(), and to get around this problem I also called the function in an a4j:status.
eg:<a4j:status onstop="javascript:addTypeAheadSupport();"/>
I hope that helps somebody,
Daniel."nbelaevski" wrote:
http://snippets.dzone.com/tag/onload
Prototype.js & jQuery libraries are already bundled with RichFaces, use a4j:loadScript to load one if you've decided to use it.