Hello all,
I am getting Really Simple History working in rails.
I''ve got this history content up etc, but I am a bit lost on how to
capture the XHR response data from the Rails app to insert into the
history.
My understanding would be to have some way of grabbing the response
data from the Rails app, inserting that into the history with
dhtmlHistory.add(''PageName'', xhr_response_data) and then eval
that
data when my listener gets called with the back and forward buttons.
I can make this work manually by doing something like this:
var pageListener = function(newLocation, historyData) {
eval(historyData);
}
and then:
dhtmlHistory.add(''home'', ''alert("We Are
Home")'');
Then hit the back and forward buttons and I get an alert box.
So, how can I capture the XHR response from the rails app and whack it
in there?
I am looking for something like:
page << %(dhtmlHistory.add(''home'', #{xhr.request});)
Ideas?
Mikel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---