Hello to all.
I use ajax tabs (rails redux) http://actsasflinn.com/Ajax_Tabs/index.html.
I have 2 simple tab ("All" and "Favorites"). As default "All" is
selected, when I click "Favorites" request is correct and there is the
render of rjs but I obtain the classic error:
... try { Element.update("favorites_pane", "\n \n \n ... and so on...
If I change div and I put it before the div panecontrol1 all is ok.
Code of loadPane method, tabselect and paneselect is on Flinn blog (I
change only li element with div element).
-------------------------------------------------------
This is the view
<ul class="tabselector" id="tabcontrol1">
<li class="tab-selected" id="all_tab">
<%= link_to_function('All', "tabselect($('all_tab')); paneselect($
('all_pane'))") %> </li>
<li class="tab-unselected" id="favorites_tab">
<%= link_to_function('Favorites', "loadPane($('favorites_pane'),
'" + url_for(:action => 'favorites') + "'),
tabselect($('favorites_tab')); paneselect($
('favorites_pane'))") %>
</li>
</ul>
<div class="panes" id="panecontrol1">
<div id="all_pane" class="pane-selected"> <%= render :partial =>
'forum/forum'%> </div>
<div id="favorites_pane" class="pane-unselected"></div>
</div>
-------------------------------------------------------
This is favorites.js.rjs
page.replace_html "favorites_pane", :partial => 'shared/xxx'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---