relating javascript...........

<% form_tag :action => "login", :html_options => {:onClick => "return validate_form(this)"} do %> Login: <br/><%= text_field_tag :name %><br/> Password: <br/><%= password_field_tag :password %><br /><br/> <%= submit_tag "SignIn" %> <% end %> <%= link_to 'SignUp', :action => 'signup' %> <%= link_to 'Forgot Password', :action => 'forgot_password' %>

I wrote the above syntx for validation..using javascript the validation is not happening.

form_for understands what you mean when you do :html_options => ..., but form_tag expects you to pass 2 option hashes: the first containing routing options, the second containing html options. Also, do you really want onClick rather than onSubmit ?

Fred

Thanks Fred for your reply,

actually the problem is

Using form tag I made a login form as discussed above. For client side validation I use Javascript.

<% form_tag :action => "login", onClick => 'return validation_form(this)' %>

<% submit_tag 'save'%>

This is not working means client side validation is not performed.

Hi

    Try this <% form_tag({:action => "login"}, {:onclick => "return validate_form(this)"}) do %>

Sijo K George