[Proto-Scripty] Selector onchange
What am I doing wrong? I have a selector and want to fire an event when the selection is changed. I thought this was a walk in the park but the darn thing isn't firing! In a dom:loaded event function I have: $('pagePageSelector').observe('onchange', function(event) { alert('ding'); }); Assuming pagePageSelector is a valid html select object, is the above correct? NOTE: content for pagePageSelector is built dynamically, so original html looks like: select id='pagePageSelector'/select Is this a problem for the onchange event hook? -- 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.
Re: [Proto-Scripty] Selector onchange
Try this instead: $('pagePageSelector').observe('change', function(event) { alert('ding'); }); Am 20.12.2010 21:25, schrieb kstubs: $('pagePageSelector').observe('onchange', function(event) { alert('ding'); }); -- 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.
Re: [Proto-Scripty] Selector onchange
Yes, got it, thanks David. -- 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.