When you hit back, the select was still where it was left. This is good for forms, but not good in this case.
Here's a simple rails example to help you out:
<%= update_page_tag { |page|
page[:content_div].replace_html( ... )
} %>
The "..." (or whatever html your generating) is what you're using now. Just wrap that with the update_page_tag { |page| page[:content_div].replace_html(...) }
Simple, took just a few minutes. I wasn't familiar with 'update_page_tag', so thought I'd share.
Method deprecated
ReplyDeletehttp://apidock.com/rails/ActionView/Helpers/PrototypeHelper/update_page_tag