[TYPO3-content-rendering] bug #0000874 to be reopened? XHTML compliance of GMENU with onmouseover images
Torsten Schrade
schrade at lineara.de
Tue Mar 28 15:27:48 CEST 2006
Hello all,
While building a GMENU with RC2 I noticed that the image rollovers still
don't work with config.doctype set to any of the XHTML doctypes. This is
related to bug #0000874 [1] which was marked fixed by Ernesto and Sebastian.
There are two problems:
1. The patch concerns two files (class_tslib_fe.php &
class.tslib_menu.php) but seems to have been applied only to
class.tslib_menu.php.
class.tslib_fe.php in RC2 contains some over() and out() JS functions
that are different from V 3.8.1 but also different from Ernestos patch?!?
2. But even with the patched functions it doesn't work - neither in IE
nor in FF or Opera. This is (in my humble no-real-JS-knacker-opinion)
due to the if (version == "n3" ) statement in function
INTincScript_loadJSCode() and in the mentioned over() and out()
functions - this just throws "version is not defined" errors in the JS
Console...
So what's the purpose of the version statement (if it's "not defined" -
can't be bowser sniffing, can it?) and why do we keep it? As soon as I
throw this out, the whole thing starts to work [2]...
Your opinions please!
Cheers,
Torsten
[1] http://bugs.typo3.org/view.php?id=874
[2] class.tslib_fe.php (lines 3641f)
' // JS function for mouse-over
function over(name,imgObj) { //
if (document[name]) {document[name].src = eval(name+"_h.src");}
else if (document.getElementById(name))
{document.getElementById(name).src = eval(name+"_h.src");}
else if (imgObj) {imgObj.src = eval(name+"_h.src");}
}
// JS function for mouse-out
function out(name,imgObj) { //
if (document[name]) {document[name].src = eval(name+"_n.src");}
else if (document.getElementById(name))
{document.getElementById(name).src = eval(name+"_n.src");}
else if (imgObj) {imgObj.src = eval(name+"_n.src");}
}';
More information about the TYPO3-project-content-rendering
mailing list