Hi, It looks to me like `deleteNonceResponseHandler` is trying to (de)reference an out-of-scope symbol, `selected`. So that's going to throw an exception and Ajax.Request will never get called. (That is, unless the parent scope defines `selected` and just you're shadowing that in `doDelete` -- but I'm guessing not. :-) )
You'll either want to make `deleteNonceResponseHandler` a closure within `doDelete` or curry[1] the arg (which does much the same thing behind the scenes, but may be better from a code maintenance perspective). Rather than `alert`, it's well worth using a proper debugger -- Firebug[2] for Firefox, Visual Studio or the Script Debugger for IE, the built-in developer tools in Chrome or Safari, ... Stepping through with a debugger gives you a much better idea what's actually happening. [1] http://api.prototypejs.org/language/function/prototype/curry/ [2] http://getfirebug.com/ HTH! -- T.J. Crowder Independent Software Consultant On Sep 3, 4:02 am, Jonhoo <j...@thesquareplanet.com> wrote: > Hi all =) > I'm having a bit of a problem with Ajax.Request... I'm trying to send > a second Ajax request inside the onSuccess handler of another, but > prototype never sends the seconds request.. > I'm getting no JS errors whatsoever, and I've tried stepping through > the code, and it seems as though Prototype tries to reuse the > XMLHttpRequest object used to send the initial request.. > > The relevant code can be seen here:http://pastie.org/1135209 > Essentially, the second onSuccess handler never gets called, and > Firebug shows that no second Ajax request is sent. > > Any ideas? > Jon -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.