Forum Moderators: open

Message Too Old, No Replies

onmouseout help

         

webnoob

4:09 am on Aug 16, 2006 (gmt 0)

10+ Year Member



i have this little bit of code, everything works fine, but after mouseout i want to return what was orginally in the the <span> tag (the image) how can i reset it back after the user mouseout? thanks.

<a onmouseover="document.getElementById('ratinginfo').innerHTML = 'Poor'" href="javascript:Req(1,$thread[threadid])">1</a>
<a onmouseover="document.getElementById('ratinginfo').innerHTML = 'Fair'" href="javascript:Req(2,$thread[threadid])">2</a>
<a onmouseover="document.getElementById('ratinginfo').innerHTML = 'Good'" href="javascript:Req(3,$thread[threadid])">3</a>
<a onmouseover="document.getElementById('ratinginfo').innerHTML = 'Avg'" href="javascript:Req(4,$thread[threadid])">4</a>
<a onmouseover="document.getElementById('ratinginfo').innerHTML = 'Great'" href="javascript:Req(5,$thread[threadid])">5</a>

<span id="ratinginfo">
<img class="inlineimg" src="/bars/$thread[trating].gif" alt="" /> $thread[votenum] rating
</span>

daveVk

4:17 am on Aug 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



perhaps
<a onmouseover="this.innerHTML = 'Poor'" href="javascript:Req(1,$thread[threadid])">1</a>

webnoob

4:39 am on Aug 16, 2006 (gmt 0)

10+ Year Member



i mean when you mouseout i want to return what is in the <span> which is the image...

right now when you mouseover the link the image is replaced with the text which is fine, but the image in the span won't return onmouseout.. don't know how to 'reset' it back after the user mouseout.

daveVk

5:25 am on Aug 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Take 2

<body onload="var original =document.getElementById('ratinginfo').innerHTML;" >

on each link add

onmouseout="document.getElementById('ratinginfo').innerHTML=original"