I have a javascript file and inside it there are some functions. I can call them on my rails app view through onclick events like: ...onclick="myFunnyFunction();"... and it works. But now I want to call this myFunnyFunction(); using the onload event like: onload="myFunnyFunction();". Both calls are in the same view file (one in a button and one in a div) and the onclick event work but the onload event don't. The div is showing the html properly so it is loaded.
Any suggestion?
Thanks in advance.