Getting prototype javascript issue on Googl chrome - ripple emulator

99 views
Skip to first unread message

renuka

unread,
Nov 6, 2012, 3:34:33 AM11/6/12
to Prototype & script.aculo.us, r...@its.jnj.com, renuka...@gmail.com
Dear Team,

When I run my application on Google chrome – ripple emulator ,
getting Prototype JavaScript issue with just blank screen.
Hence I have commented the prototype.js script file , then I was able
to view screens , but not the pop-up windows.

Error message :-
uncaught typererror : Object [object object] has no method
'getElementsByTagName'


issue at line 931

code block

document.getElementsByClassName = function(className, parentElement) {
var children = ($(parentElement) ||
document.body).getElementsByTagName('*');
return $A(children).inject([], function(elements, child) {
if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|
$)")))
elements.push(Element.extend(child));
return elements;
});
}

Kindly provide the solution.



Regards,
Renuka

Victor

unread,
Nov 9, 2012, 11:06:13 AM11/9/12
to prototype-s...@googlegroups.com, r...@its.jnj.com, renuka...@gmail.com
Which platform/runtime you have selected in Ripple?

Victor

unread,
Nov 9, 2012, 11:11:07 AM11/9/12
to prototype-s...@googlegroups.com, r...@its.jnj.com, renuka...@gmail.com
document.body.getElementsByTagName exists in Ripple. Can you give more details (stack trace, small code sample etc.)?

Victor

unread,
Nov 9, 2012, 11:37:07 AM11/9/12
to prototype-s...@googlegroups.com, r...@its.jnj.com, renuka...@gmail.com
Which version of Prototype you use? As far as I can see almost all unit tests pass on this emulator. Maybe error is in your code.

Victor

unread,
Nov 12, 2012, 3:19:00 AM11/12/12
to prototype-s...@googlegroups.com, r...@its.jnj.com, renuka...@gmail.com
Is your code working in Chrome and other browsers? IMHO error is not in Prototype - all tests and code for document.getElementsByClassName work in Ripple emulator. Maybe you are invoking document.getElementsByClassName() for wrong or non-existent object (not HTML element).
Reply all
Reply to author
Forward
0 new messages