Hey guys I''m just trying to debug a really strange bit of behaviour. I have an ajax.request with method:post and postBody specified. Inside the server page, I have a breakpoint set, so when the code is passed, the page execution stops. In firefox, i get the onsuccess function firing with a blank responseText and undefined responseJSON *before* i''ve resumed execution of the server script. If there''s no breakpoint it fires, but there is no response (presumably because it''s firing before there is content available) In IE, the onsuccess function doesn''t execute until i''ve continued execution in the debug. The reason i''m using debug here is I had the blank responseText probs in firefox, so I dug into it and set the breakpoint to see if I could determine which parameter was causing my server script to terminate prematurely. What suggestions do you guys have for me to debug this further? Im going to reboot my client pc after lunch and see if thats related but had it on another computer in the office too so I expect its something strange i''m doing. FYI, if I use method:''post'', params:''blah'' it seems like there is no http post data- is that expected? new Ajax.Request("ajax.aspx?Method=GetExistingUsers",{ method:''post'', postBody:''RelativePath='' + $(''ChosenFolder'').value, onSuccess: function (transport) { alert(''on success''); if (transport.responseJSON != undefined) { .... ajax.aspx is a fusebox for small xmlhttprequest methods, and I have a single post parameter, and a querystring parameter that defines the method. I''ve cut the rest of the funciton out - the alert fires before the server method executes. FF is 2.0.0.9 IE is 7.0.5730.11 Gareth --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Nov 26, 2007, at 6:06 PM, Gareth Evans wrote:> Hey guys > > I''m just trying to debug a really strange bit of behaviour. > > [snip]> > FYI, if I use method:''post'', params:''blah'' it seems like there is > no http post data- is that expected? > > > new Ajax.Request("ajax.aspx?Method=GetExistingUsers", > { method:''post'', postBody:''RelativePath='' + $ > (''ChosenFolder'').value, onSuccess: function (transport) { > alert(''on success''); > if (transport.responseJSON != undefined) > { > .... > > ajax.aspx is a fusebox for small xmlhttprequest methods, and I have > a single post parameter, and a querystring parameter that defines > the method. > > I''ve cut the rest of the funciton out - the alert fires before the > server method executes. > > FF is 2.0.0.9 > IE is 7.0.5730.11 > > Gareth >See if you can refactor your code to remove the need to have a mixture of POST and GET in the same request. Remove the querystring from your call to ajax.aspx, put the Method variable into the body of the POST itself. I have had very difficult-to-diagnose problems when I mix it up as you have done here. Walter --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thats easy, let me see... Thankfully asp.net stacks request.querystring("key") and request.form("key") into request("key") so I just need to change the .request and the way i''m reading the data... ./ 1 min later /. Nope, same deal. The server method executes, I am stepping through the code and the onSuccess function has already fired with a blank response. I''ve verified nothing has been returned to the client yet (no response.writes that far up in the code, equiv of echo in php, and no content headers set etc) I''ll grab a browser http sniffer and see if I can see whats going on there... any one else? Will post back in a sec. Prototype 1.6 by the way. On Nov 27, 2007 12:59 PM, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> > > On Nov 26, 2007, at 6:06 PM, Gareth Evans wrote: > > > Hey guys > > > > I''m just trying to debug a really strange bit of behaviour. > > > > [snip] > > > > > FYI, if I use method:''post'', params:''blah'' it seems like there is > > no http post data- is that expected? > > > > > > new Ajax.Request("ajax.aspx?Method=GetExistingUsers", > > { method:''post'', postBody:''RelativePath='' + $ > > (''ChosenFolder'').value, onSuccess: function (transport) { > > alert(''on success''); > > if (transport.responseJSON != undefined) > > { > > .... > > > > ajax.aspx is a fusebox for small xmlhttprequest methods, and I have > > a single post parameter, and a querystring parameter that defines > > the method. > > > > I''ve cut the rest of the funciton out - the alert fires before the > > server method executes. > > > > FF is 2.0.0.9 > > IE is 7.0.5730.11 > > > > Gareth > > > > See if you can refactor your code to remove the need to have a > mixture of POST and GET in the same request. Remove the querystring > from your call to ajax.aspx, put the Method variable into the body of > the POST itself. I have had very difficult-to-diagnose problems when > I mix it up as you have done here. > > Walter > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Okay, installed fidler and tested in both IE and FF. While i''m sitting on the breakpoint, fiddler shows no response header/body from the server, yet firefox has already fired the onSuccess callback. the result column has - in it, until i resume from the breakpoint and i can view the http request and there is no content. I can see the http post body, and the data i am posting is the same in both browsers. This is *very* strange. On Nov 27, 2007 1:05 PM, Gareth Evans <agrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thats easy, let me see... > > Thankfully asp.net stacks request.querystring("key") and request.form("key") > into request("key") so I just need to change the .request and the way i''m > reading the data... > > ./ 1 min later /. > > Nope, same deal. The server method executes, I am stepping through the > code and the onSuccess function has already fired with a blank response. > I''ve verified nothing has been returned to the client yet (no > response.writes that far up in the code, equiv of echo in php, and no > content headers set etc) > > I''ll grab a browser http sniffer and see if I can see whats going on > there... any one else? > Will post back in a sec. > > Prototype 1.6 by the way. > > > On Nov 27, 2007 12:59 PM, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > > > > > On Nov 26, 2007, at 6:06 PM, Gareth Evans wrote: > > > > > Hey guys > > > > > > I''m just trying to debug a really strange bit of behaviour. > > > > > > [snip] > > > > > > > > FYI, if I use method:''post'', params:''blah'' it seems like there is > > > no http post data- is that expected? > > > > > > > > > new Ajax.Request("ajax.aspx?Method=GetExistingUsers", > > > { method:''post'', postBody:''RelativePath='' + $ > > > (''ChosenFolder'').value, onSuccess: function (transport) { > > > alert(''on success''); > > > if (transport.responseJSON != undefined) > > > { > > > .... > > > > > > ajax.aspx is a fusebox for small xmlhttprequest methods, and I have > > > a single post parameter, and a querystring parameter that defines > > > the method. > > > > > > I''ve cut the rest of the funciton out - the alert fires before the > > > server method executes. > > > > > > FF is 2.0.0.9 > > > IE is 7.0.5730.11 > > > > > > Gareth > > > > > > > See if you can refactor your code to remove the need to have a > > mixture of POST and GET in the same request. Remove the querystring > > from your call to ajax.aspx, put the Method variable into the body of > > the POST itself. I have had very difficult-to-diagnose problems when > > I mix it up as you have done here. > > > > Walter > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
In prototype.js, at the top of respondToReadyState: function(readyState) { I put alert(readyState). Strangely, I get 2-1-4, (loaded,loading,complete) followed by my alert for ''onSuccess'' firing, but i''m still sitting on the breakpoint... This would imply firefox thinks that a response is being received? Gareth On Nov 27, 2007 1:26 PM, Gareth Evans <agrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Okay, installed fidler and tested in both IE and FF. > > While i''m sitting on the breakpoint, fiddler shows no response header/body > from the server, yet firefox has already fired the onSuccess callback. > the result column has - in it, until i resume from the breakpoint and i > can view the http request and there is no content. I can see the http post > body, and the data i am posting is the same in both browsers. > > This is *very* strange. > > > > On Nov 27, 2007 1:05 PM, Gareth Evans <agrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Thats easy, let me see... > > > > Thankfully asp.net stacks request.querystring("key") and request.form("key") > > into request("key") so I just need to change the .request and the way i''m > > reading the data... > > > > ./ 1 min later /. > > > > Nope, same deal. The server method executes, I am stepping through the > > code and the onSuccess function has already fired with a blank response. > > I''ve verified nothing has been returned to the client yet (no > > response.writes that far up in the code, equiv of echo in php, and no > > content headers set etc) > > > > I''ll grab a browser http sniffer and see if I can see whats going on > > there... any one else? > > Will post back in a sec. > > > > Prototype 1.6 by the way. > > > > > > On Nov 27, 2007 12:59 PM, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org > wrote: > > > > > > > > > > > On Nov 26, 2007, at 6:06 PM, Gareth Evans wrote: > > > > > > > Hey guys > > > > > > > > I''m just trying to debug a really strange bit of behaviour. > > > > > > > > [snip] > > > > > > > > > > > FYI, if I use method:''post'', params:''blah'' it seems like there is > > > > no http post data- is that expected? > > > > > > > > > > > > new Ajax.Request("ajax.aspx?Method=GetExistingUsers", > > > > { method:''post'', postBody:''RelativePath='' + $ > > > > (''ChosenFolder'').value, onSuccess: function (transport) { > > > > alert(''on success''); > > > > if (transport.responseJSON != undefined) > > > > { > > > > .... > > > > > > > > ajax.aspx is a fusebox for small xmlhttprequest methods, and I have > > > > a single post parameter, and a querystring parameter that defines > > > > the method. > > > > > > > > I''ve cut the rest of the funciton out - the alert fires before the > > > > server method executes. > > > > > > > > FF is 2.0.0.9 > > > > IE is 7.0.5730.11 > > > > > > > > Gareth > > > > > > > > > > See if you can refactor your code to remove the need to have a > > > mixture of POST and GET in the same request. Remove the querystring > > > from your call to ajax.aspx, put the Method variable into the body of > > > the POST itself. I have had very difficult-to-diagnose problems when > > > I mix it up as you have done here. > > > > > > Walter > > > > > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Nov 26, 2007, at 7:35 PM, Gareth Evans wrote:> In prototype.js, at the top of > > respondToReadyState: function(readyState) { > > I put > > alert(readyState). > > Strangely, I get > > 2-1-4, (loaded,loading,complete) followed by my alert for > ''onSuccess'' firing, but i''m still sitting on the breakpoint... > This would imply firefox thinks that a response is being received? > > Gareth >Check through the source, and see if onSuccess isn''t happening before you think it is. Like maybe it fires success when it connects with the script, but before it gets anything back. Sort of like it gets the 200 header, but not the body of the reply. And try onComplete for contrast. That is very definitely _after_ the response. Walter --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Check through the source of what? My server page doesn''t generate anything, I can put a breakpoint at the very start (first line), and on success will have fired.. though in IE, the on success doesn''t fire until the server page has completed (and thus sent the response). I''ll try oncomplete... same deal- callback firing with blank content before any content has actually been returned. I''ve just ensured that buffering is turned on (which ensures content is not sent until server script is complete) and it did the same thing.. though the plot thickens. I realised that other ajax requests on the same page are working fine in firefox. The specific request that is failing has the following pattern. 1) user clicks button, event.observe fires window.open for a popup window. 2) user navigates around in popup window for a bit (directory browser) & eventually clicks ''use this folder'' 3) use this folder enters a non prototype onclick which is passed the folder name in a string, it references window.opener.document.getElementById(''somehiddenfield'') and puts the text string in it 4) window.opener.somefunction(); is called, which initiates the ajax request i''m having problems with 5) window.close on popup popup doesn''t include prototype.js, which is why it is calling into window.opener.somefunction to act on the item being chosen. In an ideal world, i''d have it as a lightbox for the browsing and you''d never leave the current page but for security reasons I feel it''s better to pop up a new window, and use actual refreshes to process the folder browsing. Ringing any bells with anyone yet? Gareth On Nov 27, 2007 3:05 PM, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> > > On Nov 26, 2007, at 7:35 PM, Gareth Evans wrote: > > > In prototype.js, at the top of > > > > respondToReadyState: function(readyState) { > > > > I put > > > > alert(readyState). > > > > Strangely, I get > > > > 2-1-4, (loaded,loading,complete) followed by my alert for > > ''onSuccess'' firing, but i''m still sitting on the breakpoint... > > This would imply firefox thinks that a response is being received? > > > > Gareth > > > > > Check through the source, and see if onSuccess isn''t happening before > you think it is. Like maybe it fires success when it connects with > the script, but before it gets anything back. Sort of like it gets > the 200 header, but not the body of the reply. And try onComplete for > contrast. That is very definitely _after_ the response. > > Walter > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Also happens to me... dont know why, but I think its somehow related to the response''s cache. Have disabled my addons and tested again but the problem persists... Theres no problem when running under IE6. On Nov 27 2007, 12:58 am, "Gareth Evans" <agr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Check through the source of what? My server page doesn''t generate anything, > I can put a breakpoint at the very start (first line), and on success will > have fired.. though in IE, the on success doesn''t fire until the server page > has completed (and thus sent the response). > > I''ll try oncomplete... same deal- callback firing with blank content before > any content has actually been returned. > I''ve just ensured that buffering is turned on (which ensures content is not > sent until server script is complete) and it did the same thing.. > though the plot thickens. > > I realised that other ajax requests on the same page are working fine in > firefox. The specific request that is failing has the following pattern. > > 1) user clicks button, event.observe fires window.open for a popup window. > 2) user navigates around in popup window for a bit (directory browser) & > eventually clicks ''use this folder'' > 3) use this folder enters a non prototype onclick which is passed the folder > name in a string, it references > window.opener.document.getElementById(''somehiddenfield'') > and puts the text string in it > 4) window.opener.somefunction(); is called, which initiates the ajax request > i''m having problems with > 5) window.close on popup > > popup doesn''t include prototype.js, which is why it is calling into > window.opener.somefunction to act on the item being chosen. > > In an ideal world, i''d have it as a lightbox for the browsing and you''d > never leave the current page but for security reasons I feel it''s better to > pop up a new window, and use actual refreshes to process the folder > browsing. > > Ringing any bells with anyone yet? > > Gareth > > On Nov 27, 2007 3:05 PM, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > > > On Nov 26, 2007, at 7:35 PM, Gareth Evans wrote: > > > > In prototype.js, at the top of > > > > respondToReadyState: function(readyState) { > > > > I put > > > > alert(readyState). > > > > Strangely, I get > > > > 2-1-4, (loaded,loading,complete) followed by my alert for > > > ''onSuccess'' firing, but i''m still sitting on the breakpoint... > > > This would imply firefox thinks that a response is being received? > > > > Gareth > > > Check through the source, and see if onSuccess isn''t happening before > > you think it is. Like maybe it fires success when it connects with > > the script, but before it gets anything back. Sort of like it gets > > the 200 header, but not the body of the reply. And try onComplete for > > contrast. That is very definitely _after_ the response. > > > Walter--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
just resolved my bug... =] my function was being called by a callback from a popup, and after this callback, the popup was killed and my async ajax call returned an empty string in responseText... my solution was to make call the callback from a timeout of the opener window... that way, the closed window wont be in the caller stack On Jan 11, 4:46 pm, Michel <michel.da...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Also happens to me... dont know why, but I think its somehow related > to the response''s cache. > Have disabled my addons and tested again but the problem persists... > > Theres no problem when running under IE6. > > On Nov 27 2007, 12:58 am, "Gareth Evans" <agr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Check through the source of what? My server page doesn''t generate anything, > > I can put a breakpoint at the very start (first line), and on success will > > have fired.. though in IE, the on success doesn''t fire until the server page > > has completed (and thus sent the response). > > > I''ll try oncomplete... same deal- callback firing with blank content before > > any content has actually been returned. > > I''ve just ensured that buffering is turned on (which ensures content is not > > sent until server script is complete) and it did the same thing.. > > though the plot thickens. > > > I realised that other ajax requests on the same page are working fine in > > firefox. The specific request that is failing has the following pattern. > > > 1) user clicks button, event.observe fires window.open for a popup window. > > 2) user navigates around in popup window for a bit (directory browser) & > > eventually clicks ''use this folder'' > > 3) use this folder enters a non prototype onclick which is passed the folder > > name in a string, it references > > window.opener.document.getElementById(''somehiddenfield'') > > and puts the text string in it > > 4) window.opener.somefunction(); is called, which initiates the ajax request > > i''m having problems with > > 5) window.close on popup > > > popup doesn''t include prototype.js, which is why it is calling into > > window.opener.somefunction to act on the item being chosen. > > > In an ideal world, i''d have it as a lightbox for the browsing and you''d > > never leave the current page but for security reasons I feel it''s better to > > pop up a new window, and use actual refreshes to process the folder > > browsing. > > > Ringing any bells with anyone yet? > > > Gareth > > > On Nov 27, 2007 3:05 PM, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > > On Nov 26, 2007, at 7:35 PM, Gareth Evans wrote: > > > > > In prototype.js, at the top of > > > > > respondToReadyState: function(readyState) { > > > > > I put > > > > > alert(readyState). > > > > > Strangely, I get > > > > > 2-1-4, (loaded,loading,complete) followed by my alert for > > > > ''onSuccess'' firing, but i''m still sitting on the breakpoint... > > > > This would imply firefox thinks that a response is being received? > > > > > Gareth > > > > Check through the source, and see if onSuccess isn''t happening before > > > you think it is. Like maybe it fires success when it connects with > > > the script, but before it gets anything back. Sort of like it gets > > > the 200 header, but not the body of the reply. And try onComplete for > > > contrast. That is very definitely _after_ the response. > > > > Walter--~--~---------~--~----~------------~-------~--~----~ 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 never got to the bottom of this and I think i refactored my code to use a lightbox. Gareth On Jan 12, 2008 8:15 AM, Michel <michel.david-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > just resolved my bug... =] > > my function was being called by a callback from a popup, and after > this callback, the popup was killed and my async ajax call returned an > empty string in responseText... > > my solution was to make call the callback from a timeout of the opener > window... > that way, the closed window wont be in the caller stack > > On Jan 11, 4:46 pm, Michel <michel.da...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Also happens to me... dont know why, but I think its somehow related > > to the response''s cache. > > Have disabled my addons and tested again but the problem persists... > > > > Theres no problem when running under IE6. > > > > On Nov 27 2007, 12:58 am, "Gareth Evans" <agr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Check through the source of what? My server page doesn''t generate > anything, > > > I can put a breakpoint at the very start (first line), and on success > will > > > have fired.. though in IE, the on success doesn''t fire until the > server page > > > has completed (and thus sent the response). > > > > > I''ll try oncomplete... same deal- callback firing with blank content > before > > > any content has actually been returned. > > > I''ve just ensured that buffering is turned on (which ensures content > is not > > > sent until server script is complete) and it did the same thing.. > > > though the plot thickens. > > > > > I realised that other ajax requests on the same page are working fine > in > > > firefox. The specific request that is failing has the following > pattern. > > > > > 1) user clicks button, event.observe fires window.open for a popup > window. > > > 2) user navigates around in popup window for a bit (directory browser) > & > > > eventually clicks ''use this folder'' > > > 3) use this folder enters a non prototype onclick which is passed the > folder > > > name in a string, it references > > > window.opener.document.getElementById(''somehiddenfield'') > > > and puts the text string in it > > > 4) window.opener.somefunction(); is called, which initiates the ajax > request > > > i''m having problems with > > > 5) window.close on popup > > > > > popup doesn''t include prototype.js, which is why it is calling into > > > window.opener.somefunction to act on the item being chosen. > > > > > In an ideal world, i''d have it as a lightbox for the browsing and > you''d > > > never leave the current page but for security reasons I feel it''s > better to > > > pop up a new window, and use actual refreshes to process the folder > > > browsing. > > > > > Ringing any bells with anyone yet? > > > > > Gareth > > > > > On Nov 27, 2007 3:05 PM, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > > > > On Nov 26, 2007, at 7:35 PM, Gareth Evans wrote: > > > > > > > In prototype.js, at the top of > > > > > > > respondToReadyState: function(readyState) { > > > > > > > I put > > > > > > > alert(readyState). > > > > > > > Strangely, I get > > > > > > > 2-1-4, (loaded,loading,complete) followed by my alert for > > > > > ''onSuccess'' firing, but i''m still sitting on the breakpoint... > > > > > This would imply firefox thinks that a response is being received? > > > > > > > Gareth > > > > > > Check through the source, and see if onSuccess isn''t happening > before > > > > you think it is. Like maybe it fires success when it connects with > > > > the script, but before it gets anything back. Sort of like it gets > > > > the 200 header, but not the body of the reply. And try onComplete > for > > > > contrast. That is very definitely _after_ the response. > > > > > > Walter > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---