Why PeriodicalUpdater doesn't work on Internet Explorer?

0 views
Skip to first unread message

www.webpolis.com.ar

unread,
Sep 28, 2007, 3:52:14 PM9/28/07
to Ruby on Rails: Spinoffs
I have the following code:

<script type="text/javascript">
Event.observe(window, 'load', function() {
var updater = new Ajax.PeriodicalUpdater('chatbox', 'chat.php',
{method: 'get', asynchronous: true, frequency: 0.55, decay: 2,
onSuccess: function(){$('chatbox').scrollTop=$
('chatbox').scrollHeight}});
})

</script>

It's for a chat program i'm making, but, the Periodical Refresh
doesn't work on Internet Explorer. If i send a message from Internet
Explorer, i won't see the message displayed but Firefox does see the
message. Anyway, here is the url:

http://www.avecesestoytriste.com.ar/chat/main.php

Please help me, i think that IE only refresh the DIV ('chatbox') one
time and no more.

Thanks
Nico

Jonathan Weiss

unread,
Sep 28, 2007, 3:59:35 PM9/28/07
to rubyonrail...@googlegroups.com

> Please help me, i think that IE only refresh the DIV ('chatbox') one
> time and no more.

Use HTTP POST and not GET, IE will othervise case the request, see

http://blog.innerewut.de/2007/9/22/ie-doesn-t-let-us-rest

Jonathan

--
Jonathan Weiss
http://blog.innerewut.de

www.webpolis.com.ar

unread,
Oct 3, 2007, 10:42:14 AM10/3/07
to Ruby on Rails: Spinoffs
men... how can i give you a big T H A N K S !!!!!
you were great

thanks and good luck
nico

Richard Quadling

unread,
Oct 3, 2007, 10:54:10 AM10/3/07
to rubyonrail...@googlegroups.com
On 28/09/2007, Jonathan Weiss <j...@innerewut.de> wrote:
>
>
> > Please help me, i think that IE only refresh the DIV ('chatbox') one
> > time and no more.
>
> Use HTTP POST and not GET, IE will othervise case the request, see
>
> http://blog.innerewut.de/2007/9/22/ie-doesn-t-let-us-rest
>
> Jonathan

If you wanted to keep your GET then try adding this to your code ...

Ajax.Responders.register ( {
onCreate: function(o_Requester) {
// Timestamp each AJAX action.
var o_Date = new Date();
o_Requester.url =
o_Requester.url +
(o_Requester.url.indexOf('?') == -1 ? '?' : '&') +
'Stamp=' + o_Date.getTime();
}
} );


--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

Reply all
Reply to author
Forward
0 new messages