document.getElementsByClassName is not working my JSP.

123 views
Skip to first unread message

rajashekhar.p

unread,
Jun 18, 2009, 9:48:59 AM6/18/09
to Prototype & script.aculo.us
I am getting the following error when i access
document.getElementsByClassName method, this issue came up when i
included jquery.js in the same JSP.

Error: ($(parentElement) || document.body).getElementsByTagName is not
a function.

Thanxs

Walter Lee Davis

unread,
Jun 18, 2009, 10:12:13 AM6/18/09
to prototype-s...@googlegroups.com
Make sure you are using the "No Conflict" setting in jQuery. Otherwise
it will clobber Prototype's methods.

Walter

raj shekar

unread,
Jun 18, 2009, 10:22:57 AM6/18/09
to prototype-s...@googlegroups.com
Hiii......thank you  very much .. it worked...!!!

Thanks & Regards,
P.Rajashekar.

Alex McAuley

unread,
Jun 18, 2009, 10:26:39 AM6/18/09
to prototype-s...@googlegroups.com
I use jquery alot with prototype and i just assign jQuery to a new variable after loading prototype and jquery like this ...
 
$jq=jQuery.noConflict();
 
then every time i call a jquery function i just use $jq() instead of jQuery or $ ...
 
It works with most plugins i've found so far... definatley with most of jQuery-ui (datepicker, expose etc etc)
 
Saves headache
 
Alex

raj shekar

unread,
Jun 18, 2009, 10:28:05 AM6/18/09
to prototype-s...@googlegroups.com
Hiii......thank you  very much .. it worked...!!!


--
Regards,
P.Rajashekhar
Reply all
Reply to author
Forward
0 new messages