Well... the easiest solution would still be to use one loading message (a <div>) that you just absolutely position next to the button you clicked.
You have a reference to the target of the event, so it shouldn't be to hard to figure the rest out on your own, believe me.. it's much more fun if you figure it out yourself ;) But just to point you in the general direction: http://prototypejs.org/api/event/element Greetz, Wizz On Nov 23, 12:20 am, Mircea <[EMAIL PROTECTED]> wrote: > I have this example:www.mirceagoia.com/ajax/example > > Now when you click the buttons Ajax (Prototype is used) will load the > results for each request). > > You see that a Loading message is shown everytime...no matter which > button you click. > > What I want to accomplish is to individualize that Loading > message...to show up for each button you click WHERE the clicked > button is (and not on the top of the page). > So when you click Load Page 1 a Loading message should show up right > besides Load Page 1 button. > When you click Load Page 2 a Loading message should show up right > besides Load Page 2 button. > > And so on... > > How can I accomplish this? (look in the source to see the javascript > code). > > The general code which now shows and hides the Loading message is: > ------------------------------------ > <script language="JavaScript" type="text/javascript"> > <!-- > // --- show/hide loading --- > var myGlobalHandlers = { > onCreate: function(){ > > Element.show('systemWorking'); > }, > > onComplete: function() { > if(Ajax.activeRequestCount == 0){ > Element.hide('systemWorking'); > } > } > }; > Ajax.Responders.register(myGlobalHandlers); > > //--> > </script> > -------------------------------------- > > Thank you. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
