On Wed, 26 Jun 2013 16:35:23 -0300, D.R. <d.re...@googlemail.com> wrote:
Hi,
Hi!
"beforeClose" : function(e,m) {alert('About to close this notification!');}, so without the quotes, but alert is not called.
I've never used JGrowl, so I cannot answer about that. The resulting JSON object does seem correct. Have you tried to make this work without AJAX first? That's what I'd do.
I already had your suggestion in my focus to provide a function somewhere else and put only the functioncall in the json, but again with no luck: .tml: <script type="text/javascript"> function mybeforeclose(){ alert('About to close this notification!'); } </script> .java: retour.put("beforeClose", new JSONLiteral("mybeforeclose()")); It renders without the qoutes, but it is called when the page is loaded and not when closing the alert. Doing a: retour.put("beforeClose", "mybeforeclose()");
It should have been retour.put("beforeClose", new JSONLiteral("mybeforeclose")); You're passing a function as a parameter, not invoking the function.
-- Thiago H. de Paula Figueiredo --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org