Hi i'm trying to update a select box with a newly created record, the
problem is that to create this record i open a popup window.
How can I update the select box with the record information created in
the popup window, is there a way to observer model changes and updates
the view based on that changes?
Please I really need help on this, I read a lot of forum and articles
and i could not find anything.
You need a remote_form (ie AJAX) that updates the element in the
(named) original form of the window that calls the popup.
Just to make perfectly clear, you need to set the html NAME and ID
property of the form tag on the page that calls the pop-up window,
because the pop up window has to reference inside of that form to
update the select tag.
Julian.
Learn Ruby on Rails! Check out the FREE VIDS (for a limited time)
VIDEO #3 out NOW!
http://sensei.zenunit.com/
If you have nil experience with JavaScript and you're pressed for time
(or are impatient) I recommend forgoing the Ajax experience and
reloading the page.
Hope that helps, if not, respond with more information.
Yes i'm trying to update the select field without reloading the page.
I'll check the prototype
You need a remote_form (ie AJAX) that updates the element in the
(named) original form of the window that calls the popup.
Just to make perfectly clear, you need to set the html NAME and ID
property of the form tag on the page that calls the pop-up window,
because the pop up window has to reference inside of that form to
update the select tag.
Julian.
Learn Ruby on Rails! Check out the FREE VIDS (for a limited time)
VIDEO #3 out NOW!
http://sensei.zenunit.com/
Sorry to bother you with this, but can you send me an example of how to
do this?