Hi I''ve just started experimenting with AJAX in Rails and have come
across this issue.
I''m trying to set up some ajax form validation on a login form. I set
up an observe_field method for the username field but the action for
the containing form is being called and rendered instead of the
action I specify in the observe_field method.
All of the observe_field examples I''ve found are done using a single
input tag, no containing form...is this the issue or is it something
else I''m missing?
<%= form_tag %>
<fieldset id="login_form">
<p>Please Log In</p>
<p>
<label for="user">Username:</label>
<%= text_field("member", "username",
"class" => "text
required", "id" => "username") %>
<div id="username_verify"></div>
</p>
</fieldset>
<%= end_form_tag %>
<%= observe_field :username, :frequency => 0.5, :update
=> :username_verify, :url => { :action => :verify_username } %>