[thelist] JavaScript Multiple Events

Bojan Tesanovic btesanovic at gmail.com
Wed Jul 4 12:02:56 CDT 2007

Bruce Gilbert wrote:
> Hello,
> I am accustomed to coding rollover events in JS, but this time I am also
> looking to have a second event occur when you mouseover and that is to have
> text appear in another location eg: in a separate table or  div. Can someone
> assist me as to how this is done?
> thanks

Here is simple example lets say that you have some link with id='mhover'  and you have div for that text id='textdiv'
<a href="/" onmouseover="showText(this);" title="Some Text to display in another div">ello</a>

function triggerShow(element){
   document.getElementById('textdiv').innerHTML =   element.title;

which will show "Some Text to display in another div" in 'textdiv' div

Bojan Tesanovic

More information about the thelist mailing list