Hi,
Which form should I use? I am currently using form_for.Is it the right
form to use? What I am supposed to do in the form is to save the various
fields and go to the next page when i click the link which i am going to
name next. I am now using <%= link_to_function ''Next'',
"$(''form_id'').submit(0)" %> to create the link. I
have tried to give the
form_for an id by doing this:
<% form_for :e0_1_prod_desc,:id => ''prod'', :url => {
:action =>
:save_prod_desc } do |n| %>
There is an error when I press submit.Can someone tell me the right way
to do this?
And i just saw from somewhere,
<%= link_to_function ''Submit'',
"$(''form_id'').submit(0)" %>
Why is submit(0)? What is the difference between submit(0) and submit()?
Thanks,
fries88
--
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
-~----------~----~----~----~------~----~------~--~---
I think that should be
<%= link_to_function ''Submit'',
"$(''prod'').submit()" %>
and not
<%= link_to_function ''Submit'',
"$(''form_id'').submit(0)" %>
view source to make sure the <form> tag has id="prod" as you
intended. also you may want to call it product_form or something less
likely to conflict with something else.
On Jan 9, 7:11 pm, fries 88
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> Hi,
>
> Which form should I use? I am currently using form_for.Is it the right
> form to use? What I am supposed to do in the form is to save the various
> fields and go to the next page when i click the link which i am going to
> name next. I am now using <%= link_to_function ''Next'',
> "$(''form_id'').submit(0)" %> to create the
link. I have tried to give the
> form_for an id by doing this:
>
> <% form_for :e0_1_prod_desc,:id => ''prod'', :url
=> { :action =>
> :save_prod_desc } do |n| %>
>
> There is an error when I press submit.Can someone tell me the right way
> to do this?
>
> And i just saw from somewhere,
>
> <%= link_to_function ''Submit'',
"$(''form_id'').submit(0)" %>
>
> Why is submit(0)? What is the difference between submit(0) and submit()?
>
> Thanks,
> fries88
> --
> Posted viahttp://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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
rubynuby wrote:> I think that should be > > <%= link_to_function ''Submit'', "$(''prod'').submit()" %> > > and not > > <%= link_to_function ''Submit'', "$(''form_id'').submit(0)" %> > > view source to make sure the <form> tag has id="prod" as you > intended. also you may want to call it product_form or something less > likely to conflict with something else.Hi, I have checked to sure the <form> tag has id="prod". But it doesn''t. I am currently using form_for. And I''ve tried ways to set the id. But it does work. Can anyone teach me how to set the id for form_for? Thanks fries 88 -- 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 -~----------~----~----~----~------~----~------~--~---
:html => { :id => "here" }
On Jan 11, 2008 12:07 PM, user splash
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
>
> rubynuby wrote:
> > I think that should be
> >
> > <%= link_to_function ''Submit'',
"$(''prod'').submit()" %>
> >
> > and not
> >
> > <%= link_to_function ''Submit'',
"$(''form_id'').submit(0)" %>
> >
> > view source to make sure the <form> tag has id="prod"
as you
> > intended. also you may want to call it product_form or something less
> > likely to conflict with something else.
>
>
>
> Hi,
>
> I have checked to sure the <form> tag has id="prod". But it
doesn''t. I
> am currently using form_for. And I''ve tried ways to set the id.
But it
> does work. Can anyone teach me how to set the id for form_for?
>
> Thanks
> fries 88
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--
Ryan Bigg
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---