Re: [Rails] Re: alert with 3 button

2012-01-14 Thread Javier Quarite
On Sat, Jan 14, 2012 at 4:11 AM, Joachim Cheng wrote: > 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 %> > ... > > s

[Rails] Re: alert with 3 button

2012-01-14 Thread Joachim Cheng
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 %> ... save function save(){ $('#mysubmitform').submit(); return false;

[Rails] Re: alert with 3 button

2012-01-13 Thread Joachim Cheng
Hi Javier, I think I don't use colorbox now.. so, do you know to use jQuery Impromptu?? http://trentrichardson.com/Impromptu/index.php -- 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 t

Re: [Rails] Re: alert with 3 button

2012-01-12 Thread Javier Quarite
On Thu, Jan 12, 2012 at 12:04 PM, Joachim Cheng wrote: > > Yes, a page has many form to fill. when you click [x] close button, it > appear the dialog as above. When I try to click 'save' button, it won't > works.. > > -- > Well then, the easiest way of doing that is: * inside the function that g

[Rails] Re: alert with 3 button

2012-01-12 Thread Joachim Cheng
Javier Quarite wrote in post #1040503: > On Thu, Jan 12, 2012 at 12:23 AM, Joachim Cheng > wrote: > >> >> Problem: >> When I click "Save" button, it does't works... >> What code should I write like :onsubmit => ?? ? >> (I am weak for javascript).. >> >> Thanks. >> >> > You are trying to save a form