• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 900
  • Last Modified:

Change inner html of a div onmouseover

I need to change the inner html of a div onmouseover.  I'm having some trouble getting it to work in Internet Explorer.

Here's the page:

The text changes when you mouseOver the Bio link, and I want it to change back when the mouse is brought out of the TD.  I'm having trouble getting it to work in Internet Explorer, and it also seems to 'jerk' when you move the mouse towards the 'Faith-Based' link.

Any suggestions?
  • 3
1 Solution
Thats because u have

<td onmouseout="doSwitchOff()" style="border-bottom-style: solid; border-bottom-width: 1px; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium;" align="center" height="35">
                  <p align="center"><font color="#006633" face="Verdana, Arial, Helvetica, sans-serif" size="2"><div onMouseOut="doSwitchOff()" class="thea" id="switcher" name="switcher"><a onmouseover="doSwitchOn()" href="http://www.whatever-you-say.com/Bio.htm"><b>Bio</b></a></div></font></p>

U have a onmouseout on td, div and the a elements and they do not happen as expected...

let us know what u r trying to achieve so that u cud have better code

BreadstickAuthor Commented:
I want that Bio link to change into two seperate links onmouseover, and to change back to the Bio link onmouseout.

The main problem is that it doesn't work at all in Internet Explorer.  Any idea why?
BreadstickAuthor Commented:
I think the problem is that when the mouse moves over a link or the div, it's triggering the OnMouseOut event on the TD... is there a way to prevent this from happening? So that the links only change back when the mouse moves outside of the TD?
BreadstickAuthor Commented:
I ended up changing the html onmouseover on the div, and then changing it back onmouseover the cell above it, below it, and to the right of it.  Pretty messy, but it worked.
Closed, 200 points refunded.
Friendly Neighbourhood Community Support Admin

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now