Activate a tab after an ajax call

My main file has the following format (differnt tabs)

<%= render :partial=>'service_desk_part/edit_sd_details' %>
<%= render :partial => 'service_desk_part/view_sd_resolution_details' %>
<%= render :partial => 'service_desk_part/view_sd_attachment_details'%>
<% activeTabNo=(params[:activeTab].nil?)?0:params[:activeTab]%>

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 ?