Tuesday, December 20, 2011

[Rails] Form in fancybox/modal dialog

Hi,

I want to do some pop-up/modal dialog (I'm not sure what's the real
name of it :/) with a form inside
and after save that data I want that the form close...

As a example I've done this

<%= link_to "Add more",
{:controller=>"users", :action=>"new"}, :remote => true, :id => "pop"
%>

and this
$(document).ready(function{
$("pop").fancybox();
});

But theres a problem... after I save, inside the popup/modal appears
an error ... and when I close it, I have to hit refresh in order to
see what's been added.

I know that I have to use some javascript in order to make the new
element appear on the table, but how can I make that the modal/popup
disappears after save?


Thanks in advance


Javier Q.

--
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate