2010/9/2 Nestor Rodriguez <[email protected]>:
> Que tal amigos.
> Tengo el siguiente código Javascript:
>           var inicio = function(){
>                   Event.observe("lis_departamento" , "change",
> EVENT_departamento, false); //<== El problema esta aqui
>             }
>             Event.observe( window, "load", inicio );
>
>             function EVENT_departamento(e) {
>                 var elemento = Event.element(e);
>                 new Ajax.Updater('lis_ciudad',
>                 'SuscriptorClass.php',
>                 {asynchronous:true,
>                     evalScripts:true,
>                     parameters:'ayax=true&id_dpto=' + $F('lis_departamento')
> });
>             }
>
>
> Mi pregunta es la siguiente, como puedo pasarle un argumento a la función
> EVENT_departamento?. Si le coloco el argumento entre paréntesis me da error
> por ejemplo:
> Event.observe("lis_departamento" , "change", EVENT_departamento(parametro),
> false);  //<=== Aquí me da un error

Event.observe("lis_departamento" , "change", function(e) {
EVENT_departamento(e) }, false);  //<=== Aquí me da un error

>
> No entiendo como pesarle un parámetro, si alguien puede ayudarme.
> Desde ya gracias
>
> Atte.
> Nestor Rodriguez
>
>
>
>
>
>
> _______________________________________________
> Ruby mailing list
> [email protected]
> http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
>
>



-- 
Francisco Tufró
[email protected]
http://www.franciscotufro.com.ar
http://quov.is
http://www.dias-felices.com.ar
http://www.myspace.com/diasfelices
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar

Responder a