[Proto-Scripty] Re: changing value of select and implement the events of observer

2010-06-15 Thread ColinFine


On Jun 13, 11:53 am, josep  wrote:
> Hi.
>
> Sorry for my bad English level.
>
> I have a select like this:
>
> I want put the select into   to hide this. and
> with javascript to change manually the value of the select and execute
> the functions like the mouse.
>
> for example:
>
> $('attribue525').selectedIndex=2;
> $('attribue525').change= true
> //because I need to execute the event onchange --
>
> >Event.observe(element, 'change', this.configure.bind(this))
>
> anyone knows how to do this?

Why use an event? Why not
> $('attribue525').selectedIndex=2;
> $('attribue525').change= true
configureElement($('attribue525'));

?

-- 
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-scriptacul...@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: changing value of select and implement the events of observer

2010-06-14 Thread jacknife
Hi,
seems to me you need some way to fire the change event after the index
has been updated, isn't it?
take a look to Event.simulate, an extension to fire native events.
http://github.com/kangax/protolicious/blob/5b56fdafcd7d7662c9d648534225039b2e78e371/event.simulate.js

Federico

-- 
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-scriptacul...@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.