Hi friends,
What I am trying to do is dynamically change an HTML-defined event handler with another
JS function I have previously defined.
There is no problem when the new function has no arguments.
This code runs ok:
<script language="javascript">
function sayhello(){
alert('hello !!');
}
window.onload=sayhello;
</script>
but can anyone help to do the same but passing an argument to the event handler? I've tried something like:
<script language="javascript">
function say(theMessage){
alert(theMessage);
}
window.onload=say('hello !!');
</script>
it works fine in NS6 and Mozilla
but IE throws an error saying 'Not implemented'.
Thanks in advance
Tomàs Jiménez
OranginaLab