Steve Macleod wrote on 01 Oct 2006 in comp.lang.javascript
:
I am writing a function which will be included on other pages.
Other?
Oh you mean in an include file.
I need
to append a function call to the body onload event without disrupting
other function calls which may/may not be there. Does anyone know how
to achieve this?
will this help?
======= test.html ===============
<body onload="alert('a');">
<script type='text/javascript'>
function b(){
alert('b');
};
var x = window.onload
window.onload = function(){b();x();}
</script>
==================================
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)