I am running Ajax.request over all objects that have a certain class (I''m using the $$ function). The url is the same for all requests except for the parameter that is passed. After the first request, all of the subsequent requests come back with no data (the responseText is blank). If I change asynchronous to False it works - but this is not an acceptable solution. Does anyone have any idea on a fix? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Walter Lee Davis
2007-Aug-22 19:16 UTC
Re: Multiple Ajax.Request calls fail after first call
What is catching your request? Is there any chance that the application server is caching the result? I put a lump of cache-busting-fu at the top of any of my Ajax responders: header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // HTTP/1.0 I am sure that some of much of this is redundant, but I do it anyway. Walter On Aug 22, 2007, at 3:11 PM, RussellZ wrote:> > I am running Ajax.request over all objects that have a certain class > (I''m using the $$ function). The url is the same for all requests > except for the parameter that is passed. After the first request, all > of the subsequent requests come back with no data (the responseText is > blank). If I change asynchronous to False it works - but this is not > an acceptable solution. > Does anyone have any idea on a fix? > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I turned off caching completely (ie dev toolbar) and still get the error On Aug 22, 3:16 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> What is catching your request? Is there any chance that the application > server is caching the result? I put a lump of cache-busting-fu at the > top of any of my Ajax responders: > > header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past > header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // > always modified > header("Cache-Control: no-store, no-cache, must-revalidate"); // > HTTP/1.1 > header("Cache-Control: post-check=0, pre-check=0", false); > header("Pragma: no-cache"); // HTTP/1.0 > > I am sure that some of much of this is redundant, but I do it anyway. > > Walter > > On Aug 22, 2007, at 3:11 PM, RussellZ wrote: > > > > > I am running Ajax.request over all objects that have a certain class > > (I''m using the $$ function). The url is the same for all requests > > except for the parameter that is passed. After the first request, all > > of the subsequent requests come back with no data (the responseText is > > blank). If I change asynchronous to False it works - but this is not > > an acceptable solution. > > Does anyone have any idea on a fix?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Walter Lee Davis
2007-Aug-23 14:35 UTC
Re: Multiple Ajax.Request calls fail after first call
Does the problem follow you to Firefox? Can you post an example of the problem live somewhere? Thanks, Walter On Aug 23, 2007, at 10:00 AM, RussellZ wrote:> > I turned off caching completely (ie dev toolbar) and still get the > error >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The problem occurs in Firefox as well. The site is on a intranet that is not accessible to the public. I have other pages that are able to do multiple ajax calls without a problem. On Aug 23, 10:35 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> Does the problem follow you to Firefox? Can you post an example of the > problem live somewhere? > > Thanks, > > Walter > > On Aug 23, 2007, at 10:00 AM, RussellZ wrote: > > > > > I turned off caching completely (ie dev toolbar) and still get the > > error--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
We desire syntax On Aug 23, 2:59 pm, RussellZ <R...-1O4ALps1LdZCQoc03g6sIQ@public.gmane.org> wrote:> The problem occurs in Firefox as well. The site is on a intranet that > is not accessible to the public. I have other pages that are able to > do multiple ajax calls without a problem. > > On Aug 23, 10:35 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > Does the problem follow you to Firefox? Can you post an example of the > > problem live somewhere? > > > Thanks, > > > Walter > > > On Aug 23, 2007, at 10:00 AM, RussellZ wrote: > > > > I turned off caching completely (ie dev toolbar) and still get the > > > error--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
function init() { $$(''.usertip'').each(function(item){ buildTip(''UserInfo.jsp?userid=''+item.getAttribute(''usertip''), item); }); } function buildTip(url, item) { new Ajax.Request(url, { method:''get'', // asynchronous:false, onSuccess: function (transport) { //tooltip function via ProtoTip.js new Tip(item, transport.responseText, { fixed: true ,hook:{target:''bottomRight'',tip:''topRight''} }); } }); } The response text for every request other than the first is completely blank. On Aug 23, 4:15 pm, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> We desire syntax > > On Aug 23, 2:59 pm, RussellZ <R...-1O4ALps1LdZCQoc03g6sIQ@public.gmane.org> wrote: > > > The problem occurs in Firefox as well. The site is on a intranet that > > is not accessible to the public. I have other pages that are able to > > do multiple ajax calls without a problem. > > > On Aug 23, 10:35 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > > Does the problem follow you to Firefox? Can you post an example of the > > > problem live somewhere? > > > > Thanks, > > > > Walter > > > > On Aug 23, 2007, at 10:00 AM, RussellZ wrote: > > > > > I turned off caching completely (ie dev toolbar) and still get the > > > > error--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
No one has any idea? On Aug 24, 9:50 am, RussellZ <R...-1O4ALps1LdZCQoc03g6sIQ@public.gmane.org> wrote:> function init() { > $$(''.usertip'').each(function(item){ > buildTip(''UserInfo.jsp?userid=''+item.getAttribute(''usertip''), > item); > }); > } > > function buildTip(url, item) { > new Ajax.Request(url, { > method:''get'', > // asynchronous:false, > onSuccess: function (transport) { > //tooltip > function via ProtoTip.js > new Tip(item, > transport.responseText, > { > fixed: true > ,hook:{target:''bottomRight'',tip:''topRight''} > }); > } > }); > > } > > The response text for every request other than the first is completely > blank. > > On Aug 23, 4:15 pm, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > We desire syntax > > > On Aug 23, 2:59 pm, RussellZ <R...-1O4ALps1LdZCQoc03g6sIQ@public.gmane.org> wrote: > > > > The problem occurs in Firefox as well. The site is on a intranet that > > > is not accessible to the public. I have other pages that are able to > > > do multiple ajax calls without a problem. > > > > On Aug 23, 10:35 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > > > Does the problem follow you to Firefox? Can you post an example of the > > > > problem live somewhere? > > > > > Thanks, > > > > > Walter > > > > > On Aug 23, 2007, at 10:00 AM, RussellZ wrote: > > > > > > I turned off caching completely (ie dev toolbar) and still get the > > > > > error--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
turns out there was a lock on the EJB I was using. the fix is on the java side and this JavaScript is fine. On Aug 27, 9:04 am, RussellZ <R...-1O4ALps1LdZCQoc03g6sIQ@public.gmane.org> wrote:> No one has any idea? > > On Aug 24, 9:50 am, RussellZ <R...-1O4ALps1LdZCQoc03g6sIQ@public.gmane.org> wrote: > > > function init() { > > $$(''.usertip'').each(function(item){ > > buildTip(''UserInfo.jsp?userid=''+item.getAttribute(''usertip''), > > item); > > }); > > } > > > function buildTip(url, item) { > > new Ajax.Request(url, { > > method:''get'', > > // asynchronous:false, > > onSuccess: function (transport) { > > //tooltip > > function via ProtoTip.js > > new Tip(item, > > transport.responseText, > > { > > fixed: true > > ,hook:{target:''bottomRight'',tip:''topRight''} > > }); > > } > > }); > > > } > > > The response text for every request other than the first is completely > > blank. > > > On Aug 23, 4:15 pm, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > We desire syntax > > > > On Aug 23, 2:59 pm, RussellZ <R...-1O4ALps1LdZCQoc03g6sIQ@public.gmane.org> wrote: > > > > > The problem occurs in Firefox as well. The site is on a intranet that > > > > is not accessible to the public. I have other pages that are able to > > > > do multiple ajax calls without a problem. > > > > > On Aug 23, 10:35 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > > > > Does the problem follow you to Firefox? Can you post an example of the > > > > > problem live somewhere? > > > > > > Thanks, > > > > > > Walter > > > > > > On Aug 23, 2007, at 10:00 AM, RussellZ wrote: > > > > > > > I turned off caching completely (ie dev toolbar) and still get the > > > > > > error--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---