I am using prototype version 1.7 on IE8. It works fine on Firefox and
Opera.
The error is in this line
var nodes = $(element).getElementsByTagName('*');
Below is the code around it.
/
*--------------------------------------------------------------------------
*/
if (!document.getElementsByClassName) document.getElementsByClassName
= function(instanceMethods){
function iter(name) {
return name.blank() ? null : "[contains(concat(' ', @class, ' '),
' " + name + " ')]";
}
instanceMethods.getElementsByClassName =
Prototype.BrowserFeatures.XPath ?
function(element, className) {
className = className.toString().strip();
var cond = /\s/.test(className) ?
$w(className).map(iter).join('') : iter(className);
return cond ? document._getElementsByXPath('.//*' + cond,
element) : [];
} : function(element, className) {
className = className.toString().strip();
var elements = [], classNames = (/\s/.test(className) ?
$w(className) : null);
if (!classNames && !className) return elements;
var nodes = $(element).getElementsByTagName('*');
className = ' ' + className + ' ';
for (var i = 0, child, cn; child = nodes[i]; i++) {
if (child.className && (cn = ' ' + child.className + ' ') &&
(cn.include(className) ||
(classNames && classNames.all(function(name) {
return !name.toString().blank() && cn.include(' ' + name +
' ');
}))))
elements.push(Element.extend(child));
}
return elements;
};
return function(className, parentElement) {
return $(parentElement ||
document.body).getElementsByClassName(className);
};
}(Element.Methods);
/
*--------------------------------------------------------------------------
*/
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.