Hi. What is wrong with this code:
Do I have to create the button as a RoR special tag? how?
<html>
<head>
<title> Hello!!!</title>
</head>
<body>
<%= start_form_tag :controller=>''greet'',
:action=>''say_hi'' %>
<p>Enter Your Name:
<input name="textName" type="text"
id="textName">
</p><label><%= @message %></label></p>
<p>
<input name="btnHello" type="submit"
id="btnHello" value="Hello!!">
</p>
<%= end_form_tag %>
</body>
</html>
--
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
-~----------~----~----~----~------~----~------~--~---
On 10/4/06, Jose Pepe <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > > Hi. What is wrong with this code: > Do I have to create the button as a RoR special tag? how? > > <html> > <head> > <title> Hello!!!</title> > </head> > <body> > <%= start_form_tag :controller=>''greet'', :action=>''say_hi'' %> > <p>Enter Your Name: > <input name="textName" type="text" id="textName"> > </p><label><%= @message %></label></p> > <p> > <input name="btnHello" type="submit" id="btnHello" value="Hello!!"> > </p><p> <%= submit_tag "Save" -%> <%= end_form_tag %>> </body> > </html>The submit_tag helper is what your after http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#M000502 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hi I also found an answer in this post: http://www.ruby-forum.com/topic/66315#79612 Daniel ----- wrote:> On 10/4/06, Jose Pepe <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> <body> >> <%= start_form_tag :controller=>''greet'', :action=>''say_hi'' %> >> <p>Enter Your Name: >> <input name="textName" type="text" id="textName"> >> </p><label><%= @message %></label></p> >> <p> >> <input name="btnHello" type="submit" id="btnHello" value="Hello!!"> >> </p> > > > <p> > <%= submit_tag "Save" -%> > > <%= end_form_tag %> >> </body> >> </html> > > > The submit_tag helper is what your after > > http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#M000502-- 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 -~----------~----~----~----~------~----~------~--~---