On 25/05/2009, at 5:56 PM, Sudhi Kulkarni wrote:
> Julian Leviston wrote:
>> Every 5 second once is not understandable.
>>
>> If you want to click a button to update some text, then probably the
>> easiest would be simply to refresh the page with a form and button
>> where the target is an empty string.
>>
>> Julian.
>>
> Sorry it is once every 5 seconds... so after every 5 seconds I  
> should be
> able to read file on server and show the output
>

So every five seconds it should update the view?

This would call for a periodically call remote, or you could simply  
put an HTTP refresh in the head tag of the html, depending on how big  
the returned page is.

Make sure you have the javascripts included for prototype (defaults)  
on the page, and then use the api as discussed here:

http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M001615

This will call an action you specify in the call, and this should  
replace the contents (innerhtml) of an id'd html entity...

Julian.

----------------------------------------------
Learn: http://sensei.zenunit.com/
Last updated 20-May-09 (Rails, Basic Unix)
Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r


> Thanks,
> Sudhindra
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to