Observer not working

I'm trying to observer a field (or form as in my example) and keep getting a 'Form is not defined' error. Near as I can tell everything is in place

In the layout file, I've got the default javascript files as one post mentioned they forgot

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head>   <link href="/stylesheets/sharedScreen.css" rel="stylesheet" type="text/css">   <title>test site</title> </head> <body> <div id="main">      <%= @content_for_layout %> </div>   <!-- START_HIGHLIGHT -->   <%= javascript_include_tag :defaults %>   <!-- END_HIGHLIGHT --> </body> </html>

and in the demo.rhtml file

<form id="daily_notes" action="" method="post"> <table> <tr><td>Mon </td>     <td><%= text_field("noteExpanded", "monday",:value => "") %></td></tr> <tr><td>Tue </td>     <td><%= text_field("noteExpanded", "tuesday", :value => "") %></td></tr> <tr><td>Wed </td>     <td><%= text_field("noteExpanded", "wednesday", :value => "") %></td></tr> <tr><td>Thu </td>     <td><%= text_field("noteExpanded", "thursday", :value => "") %></td></tr> <tr><td>Fri </td>     <td><%= text_field("noteExpanded", "friday", :value => "") %></td></tr> </table> </form>

<%= observe_form "daily_notes", :frequency => 2.0,    :url => {:controller => 'assignments', :action => 'saveNotes'},    :update => "" %>

I've been playing around and have got the following code will work in a specific scenario, but other attempts just fail.

<form action ="" id ="daily_notes" method="post">   <input id='test1' name='test1' type='text' value=''> </form> <%= observe_field "test1", :frequency => 2.0, :url => {:controller => 'assignments', :action => 'test'}, :update => "" %>

If I drop that into a page, it fails, if I have it as a partial and have the page include it on load, it also fails.

BUT if I have it as a partial, have a link that calls back to the controller and does a page.insert_html :bottom, "main", :partial => '/assignments/testNote'

then it works. Anyone have any idea why it only works in such a limited fashion? I