I'm trying to fire an AJAX request when my page loads. I'm guessing this would be best from my controller.
First I open a new page..
def text_tabs_nav
end
This page has the ability to load by AJAX two different partials. I want to load one of them on default.
So I thought maybe this ..
def text_tabs_nav
respond_to do |format|
format.html
format.js
end
end
And in my text_tabs_nav.js I wrote this :
== $("#content").html("#{ escape_javascript(render :partial => 'about_us') }");
But the javascript didn't load..I use that same javascript to load things after a page has been loaded, and it works fine.
Anyone have any idea how I could load a partial ( text_tabs_nav ), with a default AJAX partial loaded within ( about_us ) ?
Thanks!