Hello,
I have a form in which I am using some javascript to disable the submit
button after it is clicked. However, it ceases to submit the form. Thus,
I need to use a javascript line that submits it. No problem there, but
it won''t work because the form doesn''t have a
''name'' tag. Using form_for
in my rhtml page in this manner:
<% form_for :push_ex, :url => { :controller =>
''push'', :action =>
''index'', :type => ''push_ex''} do %>
results in this html:
<form action="/push?type=push_ex" method="post">
I need the Ruby to render the HTML as:
<form name="push_ex" action="/push?type=push_ex"
method="post">
I tried adding :name => "push_ex" in the form_for tag, but it
doesn''t do
anything. What can I do to add the name to the form?
Thanks!!!
- Jeff Miller
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
On 25 Apr 2008, at 23:27, Jeff Miller wrote:> > Hello, > I have a form in which I am using some javascript to disable the > submit > button after it is clicked. However, it ceases to submit the form. > Thus, > I need to use a javascript line that submits it. No problem there, but > it won''t work because the form doesn''t have a ''name'' tag. Using > form_for > in my rhtml page in this manner: > > <% form_for :push_ex, :url => { :controller => ''push'', :action => > ''index'', :type => ''push_ex''} do %> ><% form_for :push_ex, :url => { :controller => ''push'', :action => ''index'', :type => ''push_ex''}, :html => {:name => ''push_ex''} do %> should do the trick Fred> results in this html: > <form action="/push?type=push_ex" method="post"> > > I need the Ruby to render the HTML as: > <form name="push_ex" action="/push?type=push_ex" method="post"> > > I tried adding :name => "push_ex" in the form_for tag, but it > doesn''t do > anything. What can I do to add the name to the form? > > Thanks!!! > - Jeff Miller > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thanks, man! you''re a wealth of information! I think you''ve answered my last 3 or 4 questions! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---