-
1. Re: Is there someting like onload for ajax loaded page?
nbelaevski Nov 5, 2010 3:47 PM (in response to liuliu)Hi Liumin,
It should be working, can you please post the relevant parts of page code?
-
2. Re: Is there someting like onload for ajax loaded page?
akaine Nov 6, 2010 5:12 PM (in response to liuliu)1. Put <a4j:jsFunction action="#{myBackingBean.preloadView}" name="preloadView" ajaxSingle="true" reRender="something"/> in any of the main forms.
2. Put <script type="text/javascript">window.onload = preloadView;</script> at the end of the template.
Works flawlessly for me.
setDateTxt('es');externalLinks();</script>
-
3. Re: Is there someting like onload for ajax loaded page?
ilya_shaikovsky Nov 8, 2010 3:28 AM (in response to akaine)put your script to outputPanel with ajaxRendered=true
-
4. Re: Is there someting like onload for ajax loaded page?
liuliu Nov 8, 2010 4:06 AM (in response to ilya_shaikovsky)hi,
My case is a little complicated. I need to adjust some divs on my page to make them the same width and height. But when there is a table in a div(by ex : a spinner in a div), the offsetHeight and offsetWidth dont ALWAYS return the right value during the page loading. Somethimes it is enough to wait a little longer, they can return the right value. I think the navigator handle diffrently the table. I tested with onload of body, my script works, So i asked for a onload method for ajax.
To Akaine Harga and Ilya Shaikovsky :
Same result with your suggestion for same reason above.
Hope i have described my problem clearly.
liu