hi everyone, my problem: prototype 1.5.1 jsp new Ajax.PeriodicalUpdater(''server_response'', ''myUrl'', { method: ''get'' , frequency: 1, decay: 1, asynchronous:true, evalScripts: true, onLoading: function(){ alert(''start ...''); }, onFailure: function(){ alert(request.responseText);}, onException: function(req, exception){ alert(exception);} }); in firefox no problem ... in IE7 calling to myUrl works only once ... caching problem ??? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I am new to the prototype.js library and JSON, and I need some help and advice. I have a mock up of a web application here: http://24.23.248.71 I would like to understand the functions or the call sequence of prototype.js and JSON to do the following things: 1. I need events on the client (button press, onClick or KeyDown/Keyup) to generate a message, embedded in a function (perhaps using JSON) the is submitted to a Ruby application running on the server. Each message is a short text message, which is stored on the server, in Ruby Queue object. 2. I also need events which occur on the server, (the server app maintains the state of each client object), to be reflected on each line of table in the client window by sending messages from the server (via HTTP) to the client using AJAX/JSON/prototype, ideally in real time or as close as is possible. Any and all suggestions as to the best approach to solving these issues is sincerely appreciated. I do realize that TIMTOWTDI, but I know that if I ask here, I can get some well informed suggestions. TIA for all replies. -- Steve Downie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
> 1. I need events on the client (button press, onClick or KeyDown/Keyup) > to generate a message, embedded in a function (perhaps using JSON) the > is submitted to a Ruby application running on the server. > Each message is a short text message, which is stored on the server, in > Ruby Queue object.Use Event.observe (http://prototypejs.org/api/event/observe) to trigger some Ajax requests (http://prototypejs.org/api/ajax/request). Pass your JSON (or plain text) as a parameter to these requests (more on JSON here: http://prototypejs.org/learn/json)> 2. I also need events which occur on the server, (the server app > maintains the state of each client object), to be reflected on each line > of table in the client window by sending messages from the server (via > HTTP) to the client using AJAX/JSON/prototype, ideally in real time or > as close as is possible.The solution to this issue is to poll the server a regular intervals using either the Ajax.periodicalUpdater (http://prototypejs.org/api/ ajax/periodicalUpdater) if you want to directly update part of the DOM, or a combination of regular Ajax Requests, a PeriodicalExecuter (http://prototypejs.org/api/periodicalExecuter) and calls to String#evalJSON (http://prototypejs.org/api/string/evalJSON) if you want to return JSON data and parse it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---