[Product-Developers] [JS/Plone 4.2] How to register onload handlers properly?

Mikko Ohtamaa mikko+plone at redinnovation.com
Tue Apr 17 14:35:51 UTC 2012


The code looks fine.

Ideas:

Try adding ; at the start and end of the code(http://jsdrama.com)

Try with different browser to see if you get different error reports /
different functionality

Try with more refined module patten
https://github.com/miohtama/sane_plone_addon_template/blob/master/youraddon/static/main.js


On Tue, Apr 17, 2012 at 16:40, Andreas Jung <lists at zopyx.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Short version: what is the correct way to register a custom
> onload handler with Plone 4.2?
>
> Background: I am using code ($(document).ready(...)) like
>
>
> http://svn.plone.org/svn/collective/vs.contentpopup/trunk/vs/contentpopup/browser/resources/contentpopup.js
>
> happily with Plone 4.2
>
> Now I am trying to make collective.calendarwidget work with Plone 4.2
>
> The related code is
>
>
> http://svn.plone.org/svn/collective/collective.calendarwidget/branches/trunk/collective/calendarwidget/browser/calendarwidget.js
>
> also using $(document).ready(...)....
>
> But the registered code is never executed.
>
> I start getting grey hairs...is there possibly some
> incompatibility between collective.js.jqueryui (used by
> collective.calendarwidget) and Plone 4.2?
>
>
> Andreas
>
>
>
> - --
> ZOPYX Limited           | zopyx group
> Charlottenstr. 37/1     | The full-service network for Zope & Plone
> D-72070 Tübingen        | Produce & Publish
> www.zopyx.com           | www.produce-and-publish.com
> - ------------------------------------------------------------------------
> E-Publishing, Python, Zope & Plone development, Consulting
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQGUBAEBAgAGBQJPjXLpAAoJEADcfz7u4AZj0hELv3X5qMIBs68JvuJsYwl8EiHO
> U0ZU17va+bBOIXhwZWOB6u5KiilQcWEN4i1mCzAgt0jk0Jdr4mZueXxQZ86uz7iO
> 53HJBuh37QJG3xheT82awsp16rd7+2GYKS/Z7koxBH5m91f2C4jN6qi1CQF7MXg8
> 9QI4Z7EeZ0ryMdJUeJ9hXA8253K3JtxUNjC1/l7UJmA/yjtzrtPFTvUeCpSs8ykE
> SipShRFrdQIjjilpk7heNIaxo51fsCPYFAnBzsNQbBMPU5ORgMsb6TOppaD7lvjs
> mI1Ln11ILbrSWYgBNPby0qjsksJRCnsiEBadAtQDBqWcC69uTkS5ETj3pAzlkFd/
> W+4WmBCz/XV3o3YPBp11Pgp54gvf4vIkwMZGe2S+tJt0xPLjKtn3mBPWC07h9l9e
> xFOTUIBDrabjCE0mKI2ygdFS3hDOIWXdWau0yc9Cpzm6uhVnvssdBkourIkHfGiY
> 56BeBv/zSRQvRgrxcYih6q/2wFOMWwY=
> =9mO9
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-product-developers
>
> --
> Mikko Ohtamaa
> <https://lists.plone.org/mailman/listinfo/plone-product-developers>
> http://opensourcehacker.com
> http://twitter.com/moo9000
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20120417/ebe8ab6c/attachment.html>


More information about the Product-Developers mailing list