Displaying 4 results from an estimated 4 matches for "validateform".
2008 Mar 10
5
Passing extra parameters to functions called from Observers
Hi again,
When you have an ''obeserver'' setup as follows:
$(''myForm'').observe(''submit'', validateForm);
If a user submits the form the ''validateForm'' function is called and
is automagically passed the ''event'' to work with. This is fantastic!
But is there a way to pass another argument to the function? Something
like:
$(''myForm'').observe('...
2009 Aug 04
6
form_for
...semail,"true",:checked=>true%><b>Email
</b>
<%=f.radio_button :isemail, "false"%><b>Sms</b>
<%=f.text_field :email_or_mobile,:size=>20%>
<%=f.submit "Generate", :onclick=>"ValidateForm()"%>
<%end%>
on validation failure it doesn''t go to the :action
please help me...
--
Posted via http://www.ruby-forum.com/.
2008 Jul 08
1
Problems with form_remote_tag
...t update
operation_panel. Instead it redirects to another page. Where did it went
wrong? What should I do?
Please help.
Thanks.
............view...................
<% form_remote_tag(:url => {:action => :update_item}, :update =>
"operation_panel", :before=>"return validateForm(this); return false;")
do %>
....
<% end %>
....................................
.........controller.................
def item
@item=Item.find(params[:id])
session[:id]=@item
end
def update_item
@item=Item.find(session[:id])
if @item.update_attributes(params[:item])...
2009 Mar 15
1
remote_form_for ajax validation
Hi,
I have been reading a lot about this, but I do not manage to do a nice
validation. I already managed to save data to the database, to
validate a field, to display a "Everything went well" message. I can
also display an error message, but the view does not end up properly.
This is the form:
<% remote_form_for(product) do |f| %>
<%= f.error_messages %>
<p>