Class style with event handler embedded ?

Giganews Newsgroups
Subject: Class style with event handler embedded ?
Posted by:  pamelafluen…@libero.it
Date: 24 Aug 2006

Hi I am back with a question.

I have something like:

<span id ="SomeID1" onclick = "Clicked(this.id)"> <div class=c1>
Something here </div></span>
<span id ="SomeID2" onclick = "Clicked(this.id)"> <div class=c2>
Something here </div></span>
<span id ="SomeID3" onclick = "Clicked(this.id)"> <div class=c3>
Something here </div></span>

....thousands others ...

Q. Is it possible to define a class style for the <span> so that it
would include
onclick = "Clicked(this.id)" and so that I have not to repeat the
onclick it for each span?
If yes, what would the code be?

-Pam

PS
the javascript people have coded form me the div question, if anyone
interested

Replies