[Proto-Scripty] Re: Responders
2009/8/12 Alex McAuley webmas...@thecarmarketplace.com: Thanks TJ, I'll look into it and see if i can hack something together Alex Mcauley http://www.thevacancymarket.com - Original Message - From: T.J. Crowder t...@crowdersoftware.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, August 12, 2009 9:54 AM Subject: [Proto-Scripty] Re: Responders Hi Alex, I don't think there's any official way. A quick look at the 1.6.0.3 release (line #1439) suggests that your responder can access the target container via the request parameter passed to your responder, specifically request.container.success (the container that will be updated on success) and request.container.failure (the one that will be updated on failure). As this is undocumented (AFAIK), it may change from release to release... HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 12, 9:37 am, Jeztah webmas...@thecarmarketplace.com wrote: Morning Guys / Gals... I am sure this has been covered before but i'll post it anyway as i cant find it in a search!... I am speeding up a website at the moment by using Ajax to do some dirty work in heavy loading pages (pagination and so on)... I need to put a loading spinner or text in place of an element while the ajax is doing its thing I could code each function to do this but i am sure there is an easier way. My first thought is to use Ajax.Responders to do something, but.. Is there a way i can get the Element that is going to be updated by the Ajax.Updater via Ajax.Responders - then i can just code something Generic into the JS and dont have to worry about updating stuff all the time... Thanks in advance Alex My solution was to use responders. As part of the response object, I add a spinner property and a form property. In the responder, if these were present, then I processed them accordingly (onCreate : spinner on , form elements disabled and onComplete/onException/onError the settings are reversed). It works for me, but does require 2 optional additional properties to the AJAX request. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling --~--~-~--~~~---~--~~ 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-scriptaculous@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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Responders
Hi Alex, I don't think there's any official way. A quick look at the 1.6.0.3 release (line #1439) suggests that your responder can access the target container via the request parameter passed to your responder, specifically request.container.success (the container that will be updated on success) and request.container.failure (the one that will be updated on failure). As this is undocumented (AFAIK), it may change from release to release... HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 12, 9:37 am, Jeztah webmas...@thecarmarketplace.com wrote: Morning Guys / Gals... I am sure this has been covered before but i'll post it anyway as i cant find it in a search!... I am speeding up a website at the moment by using Ajax to do some dirty work in heavy loading pages (pagination and so on)... I need to put a loading spinner or text in place of an element while the ajax is doing its thing I could code each function to do this but i am sure there is an easier way. My first thought is to use Ajax.Responders to do something, but.. Is there a way i can get the Element that is going to be updated by the Ajax.Updater via Ajax.Responders - then i can just code something Generic into the JS and dont have to worry about updating stuff all the time... Thanks in advance Alex --~--~-~--~~~---~--~~ 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-scriptaculous@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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Responders
Thanks TJ, I'll look into it and see if i can hack something together Alex Mcauley http://www.thevacancymarket.com - Original Message - From: T.J. Crowder t...@crowdersoftware.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, August 12, 2009 9:54 AM Subject: [Proto-Scripty] Re: Responders Hi Alex, I don't think there's any official way. A quick look at the 1.6.0.3 release (line #1439) suggests that your responder can access the target container via the request parameter passed to your responder, specifically request.container.success (the container that will be updated on success) and request.container.failure (the one that will be updated on failure). As this is undocumented (AFAIK), it may change from release to release... HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 12, 9:37 am, Jeztah webmas...@thecarmarketplace.com wrote: Morning Guys / Gals... I am sure this has been covered before but i'll post it anyway as i cant find it in a search!... I am speeding up a website at the moment by using Ajax to do some dirty work in heavy loading pages (pagination and so on)... I need to put a loading spinner or text in place of an element while the ajax is doing its thing I could code each function to do this but i am sure there is an easier way. My first thought is to use Ajax.Responders to do something, but.. Is there a way i can get the Element that is going to be updated by the Ajax.Updater via Ajax.Responders - then i can just code something Generic into the JS and dont have to worry about updating stuff all the time... Thanks in advance Alex --~--~-~--~~~---~--~~ 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-scriptaculous@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 -~--~~~~--~~--~--~---