TJ, I found that Form.EventObserver worked when I clicked submit but not until.. same thing with FormObserver, 1.
On Mon, Aug 23, 2010 at 2:37 AM, T.J. Crowder <[email protected]>wrote: > Hi, > > You want Form.Observer, not Form.EventObserver, and you need to > provide an interval telling it how often to check the form for > changes. It happens that your use case *is* the example used on > Form.Observer: > http://api.prototypejs.org/dom/form/observer/ > > HTH, > -- > T.J. Crowder > Independent Software Consultant > tj / crowder software / com > www.crowdersoftware.com > > > On Aug 23, 12:36 am, Phil Petree <[email protected]> wrote: > > Hey All! > > > > I'm trying to implement a Form.EventObserver that will change a message > > within the form. By default the message says: "These are your current > > settings." and when a key is pressed I want the message to get changed to > > say "Click the Save button to save your new settings." > > > > I have the function that sets the form message and its working just fine > > (gets called from other routines like during an ajax onComplete). > > > > My problem is that I can not get the Form.EventObserver to call my > routine. > > > > I have tried putting this in the form header, in a .js file that gets > > included specifically for this form and inline just below the form (which > is > > what most examples show) and nadda... zip... zilch... nothing! No errors > > and it absolutely doesn't get called! > > > > // this code was used in the header and inline, strip off the <script> > tags > > and the > > // raw javascript code was tried in the included form_name.js file > > <script type="text/javascript"> > > new Form.EventObserver($("myform"), updateFormMessage); > > </script> > > function updateFormMessage() { > > $('myform_msg').innerHTML = "Click the Save button to save your new > > settings."; > > alert("Form Changed!"); > > > > } > > > > Any suggestions would be appreciated! > > > > Thanks, > > > > Pete > > -- > 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 > [email protected]. > To unsubscribe from this group, send email to > [email protected]<prototype-scriptaculous%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. > > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
