There is a comma missing after the } onSuccess.
Try adding that in, it might help.
On Nov 14, 2007 11:18 PM, Yop
<YopY12-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> Just a question,
>
> I have a page which displays a summary of sorts from various sources.
> The page itself is loaded, and then about five AJAX requests are sent
> to various pages in order to get some data, a simple table with some
> information in it. I''ve chosen to do it using AJAX instead of a
> regular page buildup because it can take a few seconds for the summary
> generated by the AJAX requests to be generated.
>
> Now, this works fine in Opera, however, in both Firefox and Internet
> Explorer, this doesn''t seem to work. According to the logs, the
> requests aren''t even coming through. I''m thinking this is
due to the
> Javascript implementations in IE and Firefox, that somehow they
can''t
> handle five requests in a row or something. The code how it''s
> generated looks like so:
>
> <script type="text/javascript">
> getSummary(''plugin_1'');
> </script>
>
> <div id="plugin_1">
> <br /><br />
> <img src="/images/ajax-loader.gif" alt="Is now
loading." />
> Loading...
> </div>
> <br />
>
> where the getSummary method simply creates an Ajax.Request:
>
> function getSummary(sourcename) {
> new Ajax.Request(''/plugin.html'',
> {
> method:''get'',
> parameters: {
> sourcename: sourcename,
> ajax: ''true'',
> summary: ''true''
> },
> onSuccess: function(transport){
> if (transport.responseText)
> $(sourcename).update(transport.responseText);
> }
> onFailure: function(){
> $(pluginname).update(''An error occurred'');
> }
> });
>
> }
>
> What do you think? Do I need to change things around so that, instead
> of five different AJAX requests, there is only one (I think this can
> be accomplished fairly easily, considering all requests for summaries
> go through a single ''delegate'' controller), or is this a
problem in
> Prototype or IE or Firefox?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---