Daniel Kirsch wrote:
Andrew Poulos wrote:
Sorry for the re-post but the original message subject no longer
applies. If I try this in IE5, it doesn't work:
<script type="text/javascript">
window.onload = foo;
</script>
<body>
Why not? Do you have a foo function defined? What happens?
Works for me (but only, if there is no onload attribute set for the body
element).
I've test a few other things and I may having looking in the wrong place
for the bug(s). My actual code looks like this:
<script type="text/javascript">
top.SetCurrent(self.location);
window.onload = foo;
</script>
I have a frame calling some functions loaded at the top. If I comment
out the first line the onload line works. This code, though, works (or
appears to) in MZ and IE6. Is IE5 expecting a 'return true;' from the
first function call?
whereas this does work:
<body onload="javascript:foo();">
The onload attribute is allready defined to contain script. You don't
need to use the javascript pseudoprotocoll here.
<body onload="foo();">
Thanks.
Andrew Poulos