Hi Jochen, I'm not familiar with mootools so this may be irrelevant, but I had a similar issue with handcoded ajax/javascript. The only way I could get around it was by using settimeout to stagger the events e.g. the 2 (or more) calls were clashing. I used a figure of 750 milliseconds which seemed to be enough even for slow internet connections. Hope that helps Dave T
-----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dmitry Ruban Sent: Thursday, 27 November 2008 8:14 a.m. To: [email protected] Subject: [phpug] Re: [OT] Mootools: events only run once Hi Jochen, You are assigning both events to the same element #lun_sel. Is it correct? If yes, why you can't just put both ajax calls into one function? Jochen Daum: > Morning group, > > I have some mootools based javascript code in my <head> section, that > reloads one of two <select> boxes when the other one is changed. > > This works on the first box, but not thereafter. I can't see any > errors in Firebug, nor does the debugger stop on the event calls > again. > > Anyone know what I'm doing wrong? > > Please see code below: > > window.addEvent('domready', function(){ > > $('lum_sel').addEvents({ > change: function (){ > var x1 = new Ajax( > > '/index.php?option=com_lightingcalculator&task=xml&type=la&id='+$('lum_sel').value+'&preset='+$('lam_sel').value, > { > method: 'get', > update: 'lamp_dropdown' > } > ).request() > ; > > } > }); > $('lum_sel').addEvents({ > change: function (){ > var x2 = new Ajax( > > '/index.php?option=com_lightingcalculator&task=xml&type=lu&id='+$('lam_sel').value+'&preset='+$('lum_sel').value, > { > method: 'get', > update: 'luminaire_dropdown' > } > ).request() > ; > > } > }); > > }); > > > > Warning: This email contains information which is CONFIDENTIAL and may also be LEGALLY PRIVILEGED. If you are not the intended recipient you must not peruse, use, disseminate, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and delete this email. Thank you. ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal ##################################################################################### --~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [EMAIL PROTECTED] -~----------~----~----~----~------~----~------~--~---
