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

Reply via email to