activate a tab after an ajax call

    My main file(edit_sd_ticket_ui.rhtml) has the following format
(differnt tabs)

  <td height="35" >
   <ul id="sdmaintab" class="shadetabs">
     <li class="selected"><a href="#" rel="sddetails">Details</a></li>
     <li><a href="#"
     <li><a href="#"

<div class="tabcontentstyle">
<div id="sddetails" class="tabcontent">
  <%= render :partial=>'service_desk_part/edit_sd_details' %>
<div id="view_sd_resolution_details" class="tabcontent">
  <%= render :partial => 'service_desk_part/
<div id="view_sd_attachment_details" class="tabcontent">
   <%= render :partial =>
<% activeTabNo=(params[:activeTab].nil?)?0:params[:activeTab]%>
<script type="text/javascript">
//Start Tab Content script for UL with id="maintab" Separate multiple
ids each with a comma.
expandtab("sd_ticket_view_main_tab", <%= activeTabNo %>)

So here always first tab highlighted.Now i am calling an ajax function
link_to_remote from bottom of the file and before that takes place I
have to activate the second tab( ie tab for Resolutions) .How can i do
this?I tried with :before with link_to_remote .But how?I have a
javascript function for expanding the tab
expandtab("sd_ticket_view_main_tab", <%= activeTabNo %>)..But for that
I have to reload the page..How can I do without reloading the page
after(before) this ajax call ?


Try changing the class of the two tabs before the ajax call in the