It's likely that you're hooking up these events before the HTML is loaded. If you JavaScript is ahead of your HTML, this will happen.
See the example here: http://www.prototypejs.org/api/event/observe On Jan 8, 8:14 am, freddie <lin.freder...@gmail.com> wrote: > Hi everyone, > > Can someone enlighten me on why this isn't working for me.. I have an > onload with 3 functions listening on the submit buttons of 3 different > forms... > > problem is, the 3rd form's listener isn't being activated on > submit... > > I tried swapping the 3rd 1 to be called before the other 2 and it > works, but the other 2 will be brokekn... what am I doing wrong here? > > I'm using the prototype library... > > [PHP] > window.onload = function () { > $('rating').onsubmit = function () { > rateit(); > return false; > } > > $('form_tell').onsubmit = function () { > tellfriend(); > return false; > } > > $('form_comment').onsubmit = function () { > comment(); > return false; > }} > > [/PHP] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---