This should be fixed in trunk, no? On Wednesday, 6 November 2013 06:48:58 UTC-6, dederocks wrote: > > Hi, > I don't know if this could have solved your issue, but I had the same > problem using Chromium on Ubuntu. This dissapeared when using Chrome on the > same platform -- I have no idea why! > > Le samedi 5 octobre 2013 00:42:17 UTC+2, Junior Phanter a écrit : >> >> greetings , >> sorry my bad english , I 'm trying to implement a chat using the tornado >> and websocket_messaging.py , but I'm having trouble hearing the tornado >> server . the server receives the tornado MESSAGES using : >> >> websocket_send ( ' http://127.0.0.1:8888 ', ' Hello World ', ' mykey ', >> ' mygroup ' ) >> >> but the script : >> ----------------------------------------------------------------- >> <script> >> $(document).ready(function(){ >> var data; >> web2py_websocket('ws://127.0.0.1:8888/realtime/mygroup >> ',function(e){data=eval('('+e.data+')')}); >> }); >> </script> >> ------------------------------------------------------------------------- >> does not capture the listener . >> >> I tested the application that comes as an example within the >> websocket_messaging.py and neither worked . >> >> --------------------- exemplo dentro do websocket_messaging.py >> -------------------------- >> >> Here is a complete sample web2py action: >> >> def index(): >> form=LOAD('default','ajax_form',ajax=True) >> script=SCRIPT(''' >> jQuery(document).ready(function(){ >> var callback=function(e){alert(e.data)}; >> if(!web2py_websocket('ws://127.0.0.1:8888/realtime/mygroup >> ',callback)) >> alert("html5 websocket not supported by your browser, try >> Google Chrome"); >> }); >> ''') >> return dict(form=form, script=script) >> >> def ajax_form(): >> form=SQLFORM.factory(Field('message')) >> if form.accepts(request,session): >> from gluon.contrib.websocket_messaging import websocket_send >> websocket_send( >> 'http://127.0.0.1:8888 >> ',form.vars.message,'mykey','mygroup') >> return form >> >> >> ----------------------------------------------------------------------------------------------------- >> >> >> >> I'm using the Tornado 2.1 and 2.6.4 web2py >> >>
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

