Thanks! Alas, although I do use my own poor-man's Ajax-like code (which 
actually predates Ajax :)) in some pages, in this particular case it would be 
sorta overkill.

Having checked all the possibilities I've accepted (with a surprise) that such 
a trivial task is highly non-trivial :), and instead re-written the application 
so that the refresh is not needed anymore. That was easiest solution by far :)

Thanks again,
OC

> On 2. 9. 2022, at 9:29, Hugi Thordarson <h...@godurkodi.is> wrote:
> 
> If you're using the Ajax framework, you can also do something like…
> 
> <wo:AjaxUpdateContainer id="dlContainer">
>       <p>Number of downloads: <wo:str value="$numberOfDownloads" /></p>
> </wo:AjaxUpdateContainer>
> <wo:AjaxPing cacheKey="$numberOfDownloads" targetContainerID="dlContainer" />
> 
> <wo:link action="$download">Download</wo:link>
> 
> …and just increment numberOfDownloads on each download.
> 
> Note that AjaxPing submits lightweight requests at regular intervals (3000ms 
> by default, settable by the frequency binding) to check for changes to the 
> watched value, so it might not be suitable if you have a lot of these pages 
> open for a longer time.
> 
> Cheers,
> - hugi
> 
> 
>> On 1 Sep 2022, at 10:13, OCsite via Webobjects-dev 
>> <webobjects-dev@lists.apple.com <mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> Hi there,
>> 
>> thanks for previous answers, the JS solution works like a charm. 
>> Nevertheless, I've bumped into another problem: along with downloading the 
>> file (returning appropriate WOResponse from my action method), I would need 
>> to refresh the page as well, to increment a visible download counter etc. Is 
>> there a known solution for that? I guess again some JS trick will be needed, 
>> and alas, JS is not my forte.
>> 
>> Thanks again,
>> OC
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com 
>> <mailto:Webobjects-dev@lists.apple.com>)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is 
>> <https://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is>
>> 
>> This email sent to h...@karlmenn.is
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to