Browse the Ruby on Rails Community.

You are here: Forums Ask a Rails expert Storing values in database fro...

Replytotopic

Storing values in database from popupwindow form

Posted in Forums : Ask a Rails expert

 
Profile

Authority 25
Posting Rating 0
Sign in to rate this post

Hai I generated popup window using

<= link_to ‘Contact Cloudien’, { :controller => ‘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:
<form name="contact" action="/user/contacts" method="post" onsubmit="return contact_cloudien();" id="contact">

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.

 
Profile

Authority 25
Posting Rating 0
Sign in to rate this post

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

 
Me_on_a_train

Authority 87
Posting Rating 84
Sign in to rate this post

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

 
Mahesh_new_image

Authority 37
Posting Rating 94
Sign in to rate this post

Pat,

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

Thank You,
Uma.

 
Me_on_a_train

Authority 87
Posting Rating 84
Sign in to rate this post

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

 
Profile

Authority 25
Posting Rating 0
Sign in to rate this post

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?

Replytotopic

Other Recent Topics

Ask a Rails expert : nested application ApplicationController get called intead of children::ApplicationController

Ask a Rails expert : Best way to structure a database for a large/static dataset

Ask a Rails expert : Ruby Developer (ROR) - Scottish based (Remote working from within the UK)

Ask a Rails expert : Above Ground Pool Supplies

Ask a Rails expert : How to get url params in observer or model in Rails 3.1

Ask a Rails expert : What can persuade you to hire Junior Ruby devs with significant PHP experience?

Ask a Rails expert : What industry value does the Ruby or Rails Certification currently have?

Ask a Rails expert : Louis Vuitton Damier Azur Canvas specially sale ( www.salecheaplouisvuitton.com )

Ask a Rails expert : ·How to check errors/puts statements from ruby files which are under cronob

Ask a Rails expert : Louis Vuitton cheap Soft Sided Luggagespecial offer( www.salecheaplouisvuitton.com )

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel