From: fhanik Date: Thu, 18 Jun 2009 16:57:17 +0000 (+0000) Subject: Fix demo X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=62fd9e32d7df1e9bda7f22c1eeff77269d9db7ad;p=tomcat7.0 Fix demo git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@786159 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/bayeux/webapps/cometd/examples/simplechat/ticker.html b/modules/bayeux/webapps/cometd/examples/simplechat/ticker.html index 703706a36..5e26e4b1b 100644 --- a/modules/bayeux/webapps/cometd/examples/simplechat/ticker.html +++ b/modules/bayeux/webapps/cometd/examples/simplechat/ticker.html @@ -26,8 +26,17 @@ dojo.require("dojox.cometd"); +dojo.addOnLoad(function() { + dojox.cometd.init("/cometd/cometd"); + dojox.cometd.startBatch(); + dojox.cometd.subscribe("/stock/GOOG", onMsgEvent); + dojox.cometd.subscribe("/stock/YHOO", onMsgEvent); + dojox.cometd.subscribe("/stock/SPRG", onMsgEvent); + dojox.cometd.endBatch(); +}); + + dojo.addOnUnload(function() { - dojox.cometd.init("/cometd/cometd"); dojox.cometd.startBatch(); dojox.cometd.unsubscribe("/stock/GOOG", this,""); dojox.cometd.unsubscribe("/stock/YHOO", this,""); @@ -36,14 +45,6 @@ dojo.addOnUnload(function() { }); -dojo.addOnLoad(function() { - dojox.cometd.init("/cometd/cometd"); - dojox.cometd.startBatch(); - dojox.cometd.subscribe("/stock/GOOG", onMsgEvent); - dojox.cometd.subscribe("/stock/YHOO", onMsgEvent); - dojox.cometd.subscribe("/stock/SPRG", onMsgEvent); - dojox.cometd.endBatch(); -}); function subscribe(box, symbol) {