Solved

IE7 onmouseout background block remains

Posted on 2010-11-13
6
577 Views
Last Modified: 2012-06-27
I use
<!--[if lte IE 7]>
	<script type="text/javascript">
	sfHover=function(){var sfEls=document.getElementById("navigation").getElementsByTagName("LI");for(var i=0;i<sfEls.length;i++){sfEls[i].onmouseover=function(){this.className+=" sfhover";}
	sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"");}}}
	if (window.attachEvent)window.attachEvent("onload",sfHover);
	</script>
	<![endif]-->

Open in new window

at http://tinyurl.com/2ujswr3 to make sure the white block is hidden onmouseout. But somehow it does not seem to run in IE7 or less. As soon as I have hovered on a menu item the white background appears and does not leave. Can someone tell me why?

PS Loading it for IE6 only now, but the issue of the script not working remains the same
0
Comment
Question by:rhandalthor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 13

Accepted Solution

by:
darren-w- earned 500 total points
ID: 34127064
Try using jquery to do this, you won't have to worry about browser compatabily then
Darren
0
 

Author Comment

by:rhandalthor
ID: 34127271
@ Darren-w-: So why is the current JScript not running? I mean if I cannot get the current one to work how would I get http://api.jquery.com/hover/ to work?
0
 
LVL 13

Expert Comment

by:darren-w-
ID: 34127824
hi,

have you fixed this know, just had a look and I could not see the code you are referring to?

D
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:rhandalthor
ID: 34130341
Removed it for now as there was not solution I could use just yet. IE7 works OK without it, but IE6 does not. So the issue has not been resolved yet. It just moved to IE6. Could you help me using jQuery there to make hover function?
0
 
LVL 13

Assisted Solution

by:darren-w-
darren-w- earned 500 total points
ID: 34130803
Hi,

Take a look a Stu Nicholls website below, he does a very simple example of a on hover menu using just css and xhtml, this may be a simpler approach and should be compatible with all browsers :

http://www.cssplay.co.uk/menus/tutorial.html  (example 9)

Please get back to should you need further pointers.

Darren
0
 

Author Closing Comment

by:rhandalthor
ID: 34161739
Will use this solution for IE6 and or entire menu as soon as I have time again. Thanks!
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question