I am facing a problem wih OnLoad called in BODY tag. I want to have any alternative where I can call the required method before modify is loaded.
It is working fine for me in normal Browsers. But We are displaying these pages in WEBSPHERE PORTAL SERVER. When I display the page in this Portal server. On Load method is not called. So my data is not displayed. Is there any alternate to On Load method. Or can I call this from anywhere automatically before body is loaded.
Thanks for your help... I tried as you said but it is not working. I want this loading of method to be done in Body Onload. Eventhough I kept it in Head part in HTML page This window.onload in not called. It is not working in simple HTML page as well as in the Websphere Portal Server.
Well, at this case you could use setInterval or setTimeout. With setTimeout it is pretty strait forward - pick an average time your page loads and put something like
With setInterval your function will be called every X milliseconds and it will be your function responsobility to deside, is it time to execute the code or not. In example below I use IE property document.readyState. Or you can check is the element with certain id exist, or try to call some function, that requires page to be loaded and catch exception if it is not.
[ June 14, 2004: Message edited by: Yuriy Fuksenko ]