El 11 de junio de 2009 19:14, Martín Marqués<martin.marq...@gmail.com> escribió: > 2009/6/11 Alex McAuley <webmas...@thecarmarketplace.com>: >> >> You will need to get the value again from the select box or add a new >> observer for it upon the ajax response >> >> Post your code and someone will show you how > > actualizarProvincias() is called when country is changed (updates the > provinces) and actualizarLocalidades() is called when ever a province > is changed. > > function actualizarProvincias(url) > { > new Ajax.Request(url, { > method: 'get', > parameters: {proc: 'getProvincias', pais: $('selpais').value}, > onComplete: function(transport) { > if (200 == transport.status){ > celda = $('tdprov'); > celda.innerHTML=transport.responseText; > celda.focus(); > } > } > }) > } > > function actualizarLocalidades(url) > { > new Ajax.Request(url, { > method: 'get', > parameters: {proc: 'getLocalidades', provincia: $('selprov').value}, > onComplete: function(transport) { > if (200 == transport.status){ > celda = $('tdlocal'); > celda.innerHTML=transport.responseText; > celda.focus(); > } > } > }) > } >
Solved. Just add actualizarLocalidades(url) right after celda.focus() in actualizarProvincias() function. -- Martín Marqués select 'martin.marques' || '@' || 'gmail.com' DBA, Programador, Administrador --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---