开发者

Pass data from popup to the opening form in rails 3.1 and jQuery

开发者 https://www.devze.com 2023-04-07 16:22 出处:网络
I have a form to create a new post and inside this form I have a button that 开发者_如何学JAVAopens a popup form that create a new client.

I have a form to create a new post and inside this form I have a button that 开发者_如何学JAVAopens a popup form that create a new client. The popup is a jquery dialog. I want to do 2 things when I close the popup: 1) save the new client in the database. 2) re-render the select-box in the post form so the new client will be added to the selected box and be selected.

I'm new in the web world (JavaScript, Ajax, rails), so if anyone can please help me and tell me how to do this I'll be so grateful!! (I've spend more then 3 days for searching a solution)

BTW, I'm using rails 3.1


Try out http://defunkt.io/facebox/ to open popup & it will get closed after saving form

0

精彩评论

暂无评论...
验证码 换一张
取 消