[TYPO3] JS function for mouse-over and XHTML strict

Joern Bock j.bock at byteventure.de
Fri May 5 17:58:36 CEST 2006


Hi there,
I got a problem with the nice RO function in the HMENU. After 
configuration of a roll-over image like this:

NO.beforeImg = sth.gif
NO.beforeROImg = sth_ro.gif
NO.RO = 1

you'll find this JS code in the header (from class.tslib_fe.php):

// JS function for mouse-over
	function over(name,imgObj)	{	//
		if (version == "n3" && document[name]) ...
		else if (typeof(document.getElementById) ...
		else if (imgObj)	{imgObj.src = ...
	}
// JS function for mouse-out
	function out(name,imgObj)	{	//
		if (version == "n3" && document[name]) ...
		else if (typeof(document.getElementById) ...
		else if (imgObj)	{imgObj.src = ...
	}

I'm quite sure you all know this lines. So what is the problem? After 
configuration the page to be HTML strict:

config.doctype = xhtml_strict

the IE (6.0) refuses to show any roll over effect. One step back to 
xhtml transitional and the IE works perfekt. Obviously there is a 
XHTML-strict problem with the generated JavaScript code. Firefox is fine 
with strict and trans.

My question: came anybody across that error or solved it by any chance?
Thank you
Joern



More information about the TYPO3-english mailing list