Debt Consolidation - Gavin Newsom - Acs Student Loans - Find jobs - Debt Consolidation

PDA

View Full Version : problem with onLoad - help please!


publicidadpixelada
Feb 6th 2007, 5:17 pm
I have a script that looks like this:
<script type="text/javascript">
function ss(a, id) {
somestuff;
}
function jcc(id) {
somestuff;
}
</script>
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>

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...>

But it didn't worked, any other suggestion to transform onFocus, onMouseOver, onClick to onLoad?

Thanks in advanced!

ajsa52
Feb 7th 2007, 7:20 am
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>

publicidadpixelada
Feb 7th 2007, 1:16 pm
Thanks ajsa52