Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Storing values in database from popupwindow form
6 Posts
Storing values in database from popupwindow form

Hai I generated popup window using

'user', :action => 'contact_cloud' }, { :popup => ['new_window', 'height=500,width=500'] }%>

In the popup window i have form with feilds(name...etc).when i submit the form it completes the javascript form validations but those values are not saving in database.

This is form tag:

here control not passing to contacts def in usercontrolleronly showing contacts.rhtml. please tell me how to send control to controller and how to save values in database.

Its's working .i put the javascript close link to close the window but i need to close the popup window automatically after submitting the form( without any user interface) please me suggestions

You can trigger the form close when the AJAX request completes. See here for an example in Prototype: https://gist.github.com/5e44a2aa8b627a74389b

Pat,

can you explain it clearly how can i do this. i an unable to get from your post.

Thank You, Uma.

Take another look at the gist. I've updated it with comments to explain, step by step what's going on.

Thank You Pat Nakajima.But i have changed my code from popupwindow to modalbox.Thanks for helping me. Is any chance to display multiple modalboxes in single page?

6 Posts
Login to add your message