Hi, Is it possible to have a onload listener function for a window ? I need to call some function on load , however normal syntaxes not working. what i have tried is ..
Win.onload=function(){alert("onload");}&
Win.addEventListener("load",function(){alert("onload")});Both dint worked. How to achieve this ?
2 Answers
Accepted Answer
You need to listen to the "open" event.
Hello Ivan....
u can also write...
win.addEventListener("focus",function(e){ alert("onload"); });
Your Answer
Think you can help? Login to answer this question!