Page 1 of 1

event handler

Posted: Thu May 29, 2003 11:20 am
by nincha
how would you make an onClick to open a javascript???

Posted: Thu May 29, 2003 12:22 pm
by volka
open a javascript? what do you mean?

Posted: Fri May 30, 2003 2:52 am
by c_capo
<script>
function showAlert(){
alert('yeah yeah');
}
</script>


<a href="#" onclick="showAlert();">show alert</a>

Posted: Fri May 30, 2003 12:07 pm
by nincha
woops, i meant an external src. ex:hello.js

Posted: Fri May 30, 2003 12:34 pm
by patrikG
What exactly do you mean?

It looks to me as if you were looking for a code to include external javascript-files - if so the code is

Code: Select all

<SCRIPT LANGUAGE=JavaScript SRC="myjavascriptfile"></SCRIPT>
If not, please explain in greater detail.