469,645 Members | 1,360 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

onmouseover not working in IE

Hello
I'm trying to get a label text change in asp.net with javascript. This works in FireFox but not in IE.

Expand|Select|Wrap|Line Numbers
  1. <head>
  2. <script type="text/javascript">
  3.         function menuDagjeUit() {
  4.             document.getElementById('lblSubMenu').textContent = 'Dagje uit';
  5.         }
  6.     </script>
  7. </head>
  8.  
this is in the body:

Expand|Select|Wrap|Line Numbers
  1. <asp:HyperLink ID="hlDagjeUit" onmousemove="menuDagjeUit()" runat="server">Dagje uit</asp:HyperLink>
  2.  
  3. <asp:Label ID="lblSubMenu" runat="server" Text="sublabel"></asp:Label>
  4.  
Oct 30 '10 #1
2 2278
Dormilich
8,652 Expert Mod 8TB
textContent is a DOM property not supported by IE.
Oct 30 '10 #2
Atli
5,058 Expert 4TB
textContent is a DOM property not supported by IE.
Not until IE9 at least.

Use innerHTML instead for IE8 and lower.
Oct 31 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by drjackk | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.