Im not sure about the best way to go about dealing with the following
situation.  I have a number of popups that each contain a link "add
time" which ajaxes and renders a partial:

page.replace_html "add_appt_#{params[:day]}", :partial => 'add_appt'

and within this partial a javascript function is called which
populates an element with id "start_time".  The problem that I am
facing is that if I click and close the partial without replacing the
new partial, the javascript function finds the first element in the
DOM with id "start_time" and it doesnt work.  My question is would it
be better to rename all the start_time elements so that they are all
unique?  or would it be better to somehow replace the html upon the
closing of the popup?  or is there an even better solution that I
havent yet considered?
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to