View Full Version : onclick event

06-25-2009, 08:27 PM

Not an expert but could use some understanding and confirmation regarding the use of onclick event handlers.

I've worked with them on many occasions, but my question if an HTML tag currently has an onclick event and I need to add another, can I just simply add another onclick?


<a href="/files/Registration_Form.doc" onClick="javascript: pageTracker._trackPageview('/downloads/Registration_Form_Universal'); onclick="javascript:this.form-just a sample">here</a>

Is this possible to do?


Philip M
06-25-2009, 08:56 PM
No, but a single onclick event can trigger multiple functions or actions:-

<a href = '/files/Registration_Form.doc' onclick = 'doThis();doThat()'>Click Here</a>

javascript: is not necessary

"Simon is tying his shoelaces to the left of the umpire's chair." - Tennis commentator