Re : Auto Refresh after a time period

Re : Auto Refresh after a time period

  
Hi,
I want to create an effect in my page header that appears to scroll through a list of text 'quotes' one at a time, changing from one text quote to another after about 5 seconds. I would normally do this by creating a flash SWF file and embedding in the page.

I am new to Outsystems and also to AJAX - is there a way to acheive the same kind of effect without using flash?

Thanks in advance of your responses,

Tony
Hi Anthony,

Yes, it is possible but will require JavaScript / jQuery knowledgement.
You will probably need more help but start from here:

http://www.prototypejs.org/api/ajax/periodicalUpdater
http://plugins.jquery.com/project/periodicalupdater

Regards,
Rafael Pereira


Hi Anthony,

I think i've just uploaded a component that does what you want. Check it at http://www.outsystems.com/NetworkSolutions/ProjectDetail.aspx?ProjectId=192.

Feel free to ask anything related to it.

Best regards,
Miguel Antunes
Nice tip Miguel! :-)

@Anthony: Send us your feedback...

Regards,
Rafael Pereira
Rafael -

It's actually not too hard, and zero jQuery is needed. All you need is a button with a style with display: none, and a one-line JavaScript to click the button when scheduled. The button (set type to Ajax) then calls an Action which changes the screen and does an Ajax refresh.

J.Ja
Thanks for all your feedback guys - i will try everything out later this week and feedback my thoughts as a new developer.
It really is useful having such a helpful forum to answer questions when you are just starting out!
Thanks

Tony
Hi Anthony,

Good to hear - that's what everyone's here for. Do let us know how it goes, and what more help you need!

Regards,

Paulo Tavares
Thanks for all your suggestions for this, I have learned a lot following the advice over the last couple of weeks.
I have managed to get the effect I wanted using both the ajax call method and also using the javascript method, similar to the example provided by Miguel.

For my particular example, the JS method is best because I will only be loading a small number of records each time the page is loaded and I don't need to go back to the server for new or changed data as it is not transactional data.

Once again, thank you everyone for your willingness to help!

Regards

Tony 
Thanks for the feedback Tony.

Do let us know how everything goes!

Regards,

Paulo Tavares
Just uploaded a component that may help. Shows how to periodically poll a very lightweight page via an AJAX GET request, that return a JSON informing the browser whether it should actually refresh the contents.

http://www.outsystems.com/forge/component/195/lightweight-ajax-refresh/
@Goncalo,

you got a 6.0 version for it?
Hello guys,

I have a simple AutoRefresh widget that every T miliseconds clicks on a hidden button and refreshes the content placeholder.
It also stores scroll information from the top inner container (in case you want to keep the current scroll position).
If you want an example that keeps the scroll position just ask :)

Hope it helps

Regards,
HD