onClick for text link
-
Hi,
I am trying to play a sound using javascript when the viewer clicks a link.
<a href="playBang();" onClick="playBang();">bang</a>I have the
playBang();function working fine, if I run it asjavascript:playBang();in the browser url bar, it works fine.I have tried putting the js in both (and separately) the href and onClick of the link.
href="..."gets reformatted tohref="javascript:void(0)"andonclick="..."is reformated toonclick.
I’ve tried over an hour to get this to work and have searched the internet, am I doing something wrong? Thank you![ Please do not bump, it’s not permitted here. ]
The topic ‘onClick for text link’ is closed to new replies.