Note - this causes problems when using the invoke function as well...
<html>
<head>
<title>Opera test</title>
<script src="prototype.js" type="text/javascript"></
script>
<script type="text/javascript">
Element.addMethods("DIV", {
divOperaTest: function(e) { window.alert("Test Successful ("
+
e.innerHTML + ")"); }
});
document.observe("contentloaded", function() {
$$("div").invoke("divOperaTest");
});
</script>
</head>
<body>
<div>Test Div</div>
<div>Test Div 2</div>
</body>
</html>
Errors with:
Event thread: dataavailable
Error:
name: TypeError
message: Statement on line 698: Could not convert undefined or null to
object
Backtrace:
Line 698 of linked script file://users/ntoone/prototype.js
return value[method].apply(value, args);
Line 624 of linked script file://users/ntoone/prototype.js
results.push(iterator(value, index));
Line 584 of linked script file://users/ntoone/prototype.js
iterator(value, index++);
Line 831 of linked script file://users/ntoone/prototype.js
iterator(this[i]);
Line 585 of linked script file://users/ntoone/prototype.js
this._each((function (value)
{
iterator(value, index++);
}
));
Line 625 of linked script file://users/ntoone/prototype.js
this.each((function (value,index)
{
results.push(iterator(value, index));
}
));
Line 697 of linked script file://users/ntoone/prototype.js
return this.map((function (value)
{
return value[method].apply(value, args);
}
));
Line 9 of inline#1 script in file://users/ntoone/test.html
$$("div").invoke("divOperaTest");
Line 3867 of linked script file://users/ntoone/prototype.js
handler.call(event.target, event);
At unknown location
[statement source code not available]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---