Yeah, I can do it.

<%= link_to "save", "#", :remote=>true, :onclick=>"save_with_click"%>
function save_with_click(){
$("#form_id").submit();
}

change to:

<%= form_tag save_file_path, :id => 'mysubmitform' do %>
...

<a href="javascript:save();">save</a>
<script>
function save(){
$('#mysubmitform').submit();
return false;
}
</script>

...
<% end %>

This function can works for me!! I am using jquery colorbox.
Thank you, Javier.

--
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@googlegroups.com.
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.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 9 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 12, '12 at 5:23a
activeJan 14, '12 at 11:31a
posts9
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Joachim Cheng: 5 posts Javier Quarite: 4 posts

People

Translate

site design / logo © 2022 Grokbase