Dynamic HTML and highlighting

John Fitzgibbon jfitzgibbon at Galwaylibrary.ie
Wed Dec 8 06:03:19 EST 2004


Hi,

 

I have created a HTML document with people's names marked up as follows
<span class="person">John Doe</span>.

 

I wish to allow users to highlight all names on the web page by ticking
a checkbox labeled 'Highlight'.

 

I can use JavaScript to dynamically change the background color of an
element using 'onclick="this.style.backgroundColor="' If I am seeking to
reference all span elements in the document with an attribute of class
whose value is person how do I proceed? Is it possible?

 

All ideas are welcome.

 

Regards

John


******************************************************************* 
Tá eolas atá príobháideach agus rúnda sa ríomhphost seo 
agus aon iatán a ghabhann leis agus is leis an duine/na daoine
sin amháin a bhfuil siad seolta chucu a bhaineann siad. 
Mura seolaí thú, níl tú údaraithe an ríomhphost nó aon iatán 
a ghabhann leis a léamh, a chóipáil ná a úsáid. 
Má tá an ríomhphost seo faighte agat trí dhearmad, 
cuir an seoltóir ar an eolas thrí aischur ríomhphoist 
agus scrios ansin é le do thoil. 

This e-mail and any attachment contains information which is 
private and confidential and is intended for the addressee 
only. If you are not an addressee, you are not authorised 
to read, copy or use the e-mail or any attachment. 
If you have received this e-mail in error, please notify 
the sender by return e-mail and then destroy it. 
*********************************************************************



*********************************************************************
Due to deletion of content types excluded from this list by policy,
this multipart message was reduced to a single part, and from there
to a plain text message.
*********************************************************************



More information about the Web4lib mailing list