I have a script that looks like this: <script type="text/javascript"> function ss(a, id) { somestuff; } function jcc(id) { somestuff; } </script> Code (markup): And a link that looks like this: <a id ="omg" href ="http://google.com" onFocus = "ss('go to www.google.com','omg')" onMouseOver = "return ss('go to www.google.com','omg')" onClick = "jcc('omg')"> <img src="small.gif" width="500" height="300"></a> Code (markup): It works perfect, when you click/focus/point the link javascript is executed.. But I wan't to do all onLoad instead of waiting the user to click on the link. I tried using this: <a onLoad="ss('go to www.google.com','omg');return ss('go to www.google.com','omg');jcc('omg')" href...> Code (markup): But it didn't worked, any other suggestion to transform onFocus, onMouseOver, onClick to onLoad? Thanks in advanced!
Try adding onload to your HTML body: <body onLoad="ss('go to www.google.com','omg');return ss('go to www.google.com','omg');jcc('omg')"> ..... </body> Code (markup):