mootools / mootools-core

MooTools Core Repository
https://mootools.net
2.65k stars 510 forks source link

how can i make onchange select event firing? #2754

Closed newbie78 closed 8 years ago

newbie78 commented 8 years ago

see this fiddle plz http://jsfiddle.net/96s4kq8m/1/

is that firing really plssible? and if no then why? thanks very mutch

swhiteman commented 8 years ago

$('test').fireEvent('change');

This isn't a GitHub issue, so pls remove it. It should be on the mailing list mootools-users@googlegroups.com

timwienk commented 8 years ago

In your JSFiddle you the following error is thrown: TypeError: $(...).fireEvents is not a function.

The problem is indeed what Sandy just mentioned, you should use fireEvent, not "fireEvent_s_".

I will close this issue. If you would like any other support, please ask on the mailing list: https://groups.google.com/forum/#!forum/mootools-users

newbie78 commented 8 years ago

yes. this is my mistake. okay - thats work.

but why firing not work in this fiddle? http://jsfiddle.net/96s4kq8m/4/

thanks again

newbie78 commented 8 years ago

please answ my q. in google mailing list forum no one answ me.

DimitarChristoff commented 8 years ago

so i answered this like 5 yrs ago. http://stackoverflow.com/questions/2689010/mootools-programmatically-fired-events-not-working-with-event-delegation - looks like mootools does not normalise and bubble native change events just yet.

newbie78 commented 8 years ago

Dimitar, thanks for answer

http://jsfiddle.net/96s4kq8m/5/ How could i get the changed 'field' (see fiddle) by means of usual addEvent('change') (see this http://jsfiddle.net/96s4kq8m/6/)?

newbie78 commented 8 years ago

maybe will we need to reopen the issues?

newbie78 commented 8 years ago

http://jsfiddle.net/96s4kq8m/7/ fireEvent worked but event is undefined. why?

ps i check this in chrome & ff latest versions