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
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 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.
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 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 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
:html => { :id => “here” }
On Jan 11, 2008 12:07 PM, user splash [email protected]
wrote:
view source to make sure the tag has id=“prod” as you
Thanks
fries 88
Posted via http://www.ruby-forum.com/.
–
Ryan B.
Feel free to add me to MSN and/or GTalk as this email.