This topic needs a title

Hello,

is there an action available to periodically reload an iframe ? It should work in the way that the iFrame’s URL (e.g. www.domain.tld/script.cgi?option1=123&option2=abc) is triggered every x seconds.

Alternatively to an iFrame, this could also work with HTML items (

containers).

I already gave actionsforge.com a try, but haven’t found something suited to fulfill this task.

Tobias.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you want this to happen within your own domain, then you can use
the Ajax.PeriodicalUpdater from Prototype.js (and the Protaculous
Action) to update a DIV. If you want to access content from another
domain, then you can’t use a DIV unless you also code a proxy
application (in PHP or similar). JavaScript cannot access content
outside of the current domain, as a security measure.

If you want to try using an iframe, I think that one way you could do
this would be to set the src parameter to about:blank and then
immediately set it back to your original URL. I believe that you can’t
reload an iframe from the outside, but you could try that.

var reloadMe = function(){
	var iF = $('theIdOfYourIframe');
	iF.src = 'about:blank';
	iF.src = 'http://the.server.here';
}
//or maybe
var reloadMe = function(){
	var iF = $('theIdOfYourIframe');
	if.location.reload(); //not sure this will do anything useful
}
//either way, use this to trigger it on a schedule
var pe = new PeriodicalExecuter(reloadMe,60); //reloads every minute

Paste that code into the Function Body window within Protaculous, and
be sure to substitute the actual ID of your iframe when you do. Also,
don’t use both of the reloadMe functions – try one or the other and
delete the one that doesn’t work.

Walter

On Feb 2, 2010, at 6:59 PM, tobiaseichner wrote:

Hello,

is there an action available to periodically reload an iframe ? It
should work in the way that the iFrame’s URL (e.g. www.domain.tld/script.cgi?option1=123&option2=abc)
is triggered every x seconds.

Alternatively to an iFrame, this could also work with HTML items
(

containers).

I already gave actionsforge.com a try, but haven’t found something
suited to fulfill this task.

Tobias.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ooops, watch the capitalization: make this one iF.location.reload();

Walter

On Feb 2, 2010, at 8:57 PM, Walter Lee Davis wrote:

//or maybe
var reloadMe = function(){
var iF = $(‘theIdOfYourIframe’);
if.location.reload(); //not sure this will do anything useful
}


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you very much, waltd :slight_smile: Yes, the content may reside outside the domain, not sure yet. So I give it a try with iframes, that appears being more versatile :slight_smile:

By the way, is there a chance to get custom scrollbars for iframes (not the browser’s default ones) ? I’m sure I read a thread here a few weeks ago, but now cannot find it.

Tobias.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You can use CSS to style the browser scrollers – but only on IE, and
only with non-standard attributes. I don’t think that you can use the
same sort of fake scroll techniques on an iframe, because you would
have to do that from the realm of the iframe’s content page, not the
page that hosts the iframe.

What you can definitely do (although it opens up the whole proxy issue
I noted earlier) is to use an overflow:hidden DIV to host the content,
and then apply your favorite fake scroll effect to that.

Walter

On Feb 3, 2010, at 5:28 AM, tobiaseichner wrote:

Thank you very much, waltd :slight_smile: Yes, the content may reside outside
the domain, not sure yet. So I give it a try with iframes, that
appears being more versatile :slight_smile:

By the way, is there a chance to get custom scrollbars for iframes
(not the browser’s default ones) ? I’m sure I read a thread here a
few weeks ago, but now cannot find it.

Tobias.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi there

In situations like this I have applied the ‘timed redirect’ action to the page and set it to the number of seconds I want. Simply make it redirect to itself and the iframe should refresh at the same time as the page is reloaded.

All the best

Gordon
http://ww.gordonlow.net/


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options