admin管理员组文章数量:1287859
I'm trying to bine Drupal with Picasa web integrator.
I have these 3 lines in the section of my page.tpl.php:
<script type="text/javascript" src=".4.2/jquery.min.js"></script>
<script type="text/javascript" src="/fotos/js/jquery.slimbox2/jquery.slimbox2.js" language="JavaScript"></script>
<script type="text/javascript" src="/fotos/js/jquery.pwi.js" language="JavaScript"></script>
I also added this script to my head section, to test an album (the username and albumname are not important, I tested it offline with my username and album and that worked fine):
<script type="text/javascript">
$(document).ready(function() {
$("#container").pwi({
username: 'My',
maxresults: 5,
mode: 'album',
album: 'MyAlbum'
});
});
</script>
Google Chrome gives me this error when I try it on my Drupal-page:
prototype.js:5733Uncaught TypeError: Object#<Object> has no method 'dispatchEvent'
I'm trying to bine Drupal with Picasa web integrator.
I have these 3 lines in the section of my page.tpl.php:
<script type="text/javascript" src="http://ajax.googleapis./ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="/fotos/js/jquery.slimbox2/jquery.slimbox2.js" language="JavaScript"></script>
<script type="text/javascript" src="/fotos/js/jquery.pwi.js" language="JavaScript"></script>
I also added this script to my head section, to test an album (the username and albumname are not important, I tested it offline with my username and album and that worked fine):
<script type="text/javascript">
$(document).ready(function() {
$("#container").pwi({
username: 'My',
maxresults: 5,
mode: 'album',
album: 'MyAlbum'
});
});
</script>
Google Chrome gives me this error when I try it on my Drupal-page:
prototype.js:5733Uncaught TypeError: Object#<Object> has no method 'dispatchEvent'
Share
Improve this question
edited Jul 12, 2011 at 9:19
Puyol
asked Jun 13, 2011 at 13:56
PuyolPuyol
3,1095 gold badges26 silver badges33 bronze badges
2 Answers
Reset to default 3Drupal also es with jQuery, and you cannot simply just add the later version in <script>
tags. You can try using Drupal's jquery update to get a more recent version, or try noConflict (I suspect you will need it anyhow if you want to use Prototype).
It looks like you are also loading prototype.js on the page (used by lightbox.js
, perhaps?, and that perhaps the $
used by both jQuery and Prototype are conflicting. If you really need to use both Prototype and jQuery, look into using jQuery's noConflict
mode: http://api.jquery./jQuery.noConflict/.
本文标签: javascriptUncaught TypeError ObjectltObjectgt has no method 39dispatchEvent39Stack Overflow
版权声明:本文标题:javascript - Uncaught TypeError: Object#<Object> has no method 'dispatchEvent' - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741332618a2372852.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论