views:

27

answers:

1

Hi,

I am using jquery ui in a rails application. I want to load content of the tab via ajax when the tab is clicked. I have evverything set up correctly, i.e. my controller responds to a xhr request and it simply replaces the content of a certain div (inside the tab content). This all seems to work fine with prototype, however, If I try to re-use the same controller code and call the index.js action from jqeruy ui tabs, it does not seem to work, I am guessing it's because the response sent is in prototype and jquery does not know what to do with it?

Whats the best way to accomplish this? I would rather not include another jquery plugin, since I am using prototype extensively (at least for the xhr responses) and rather not rewrite a bunch.

Update: The code is at http://pastie.org/1024228. I am getting the error on show.html.erb at line 37. Thanks

A: 

Well I just followed Ryan's Bates episode on jquery, creating a index.rjs.erb file and using plain jquery for that action to populate the div.

badnaam
This "answer" confuses me. Are you trying to say that this is what solved your problem, or are you saying that this is what caused the original problem you post a question on SO about?
Matt Huggins