Hi,
I just started investigating prototype (1.8) and scriptaculous and was
quite keen on the Ajax.PeriodicalUpdater and was frustrated by the I/E
caching problem. By sheer accident, I found that not using
method:''get'' fixed I/E, I did not have to use any other
trickery
new
Ajax.PeriodicalUpdater(''thetime'',''/callme.php'',
{
asynchronous:true,
insertion: Insertion.Top,
frequency:1.1223333
});
Hope this helps
Dan
jca wrote:> Hello,
>
> I have a problem using a PeriodicalUpdater using prototype 1.6.0 on
> safari 3.0.4, while everything works as intended under firefox, opera
> and IE.
>
> The code is monitoring the status of a server-side process, reporting
> back via a div named ''status'', and then once the job is
completed,
> loading a results page. The following function is triggered from an
> onload attached to the pages body element, and is passed the URI of
> the status reporting callback, and that of the results page:
>
> function get_status(update, result) {
> var update_url = encodeURI(update);
> var result_url = encodeURI(result);
> // necessary hack for IE since it caches GET requests..., so add a
> timestamp to each request
> Ajax.Responders.register ( { onCreate: function(o_Requester) {
> var o_Date = new Date();
> o_Requester.url >
o_Requester.url +
> (o_Requester.url.indexOf(''?'') ==
-1 ? ''?'' :
> ''&'') +
> ''Stamp='' + o_Date.getTime();
> }
> } );
> updater = new Ajax.PeriodicalUpdater(''status'',
update_url,
> {asynchronous:true, method:''get'', frequency:2,
>
onFailure:function(request){$(''status'').innerHTML=''Failure;
request
> status=''+request.status},
> onSuccess:function(request){if (request.responseText.match(/
> completed/)) {updater.stop(); document.location=result_url} }
> })
> }
>
> Adding a couple of alert()s to the code shows that the function is
> being called correctly, but no status information is being displayed.
> Monitoring the server logs shows that no requests are being made to
> the update_url. The only similar example I could find with google was
> due to the onFailure /onSuccess functions being named rather than
> anonymous, but that doesn''t look to be the case here.
>
> Does anyone have any ideas as to why these requests are not being
> made?
>
> Many Thanks,
> James
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---