Active Resource in Unobtrusive Javascript
I don't know any better way to ask this question than to give my situation.

I have a reader application that needs to be made, on the page it will have the Table of Contents on the left side and the actual content of the book on right.  The TOC content shows chapters and sections within the chapter.  The content on the right will only shows one of those sections at a time, no preloading the whole book.  When you click on the section in the TOC, makes an API call to a separate server that holds all the book data and returns the HTML to be displayed in the content section. 

I want to know if there is a way to make the application to use both unobtrusive javascript and active resource. Active resource would handle the interaction between the Rails Application and the server that holds the book content.  The unobtrusive javascript would be the controller between the table of contents and the content on the right.

I guess what I'm wondering most of all, beyond just its possibility, is if I can integrate this is such a way that I don't need to make unnecessary api calls.  Currently, I can't figure out how this would work without it making an api call to rails then making another api call to the book content provider. 

Thanks for your help in advance!

@tab
Active Resource in Unobtrusive Javascript
===

I don't know any better way to ask this question than to give my situation.

I have a reader application that needs to be made, on the page it will have the Table of Contents on the left side and the actual content of the book on right.  The TOC content shows chapters and sections within the chapter.  The content on the right will only shows one of those sections at a time, no preloading the whole book.  When you click on the section in the TOC, makes an API call to a separate server that holds all the book data and returns the HTML to be displayed in the content section. 

I want to know if there is a way to make the application to use both unobtrusive javascript and active resource. Active resource would handle the interaction between the Rails Application and the server that holds the book content.  The unobtrusive javascript would be the controller between the table of contents and the content on the right.

I guess what I'm wondering most of all, beyond just its possibility, is if I can integrate this is such a way that I don't need to make unnecessary api calls.  Currently, I can't figure out how this would work without it making an api call to rails then making another api call to the book content provider. 

Thanks for your help in advance!

@tab