def sd_resolution_save_from_search_sd_ticket #Some code here
sd_resolution_save_common_function
redirect_to(:action => ‘show_details’, :id =>
params[:id],:activeTab => 1)
end
So the result is executing the show_details with highlighted second tab
(Did using a script .Tab in order 0,1,etc).
But the problem is (not big) now the address bar of the browser like
So wgen ever i refresh the second tab highlighted.What I need is to
highlight the first tab.How?How can I redirect to make address bar of
browser like http://localhost:3000/service_desk/show_details/7
Hi
Thanks for your reply.But first time I need second tab
highlighted.But after changing the routes.rb as you said it always
highlighting the first tab.What I need is browser look like
So then the tab second will be highlighted and when i press refresh the
first tab will.(My scrpt takes tab order as 0,1,etc. activeTab=1 is the
second tab)
So then the tab second will be highlighted and when i press refresh the
first tab will.(My scrpt takes tab order as 0,1,etc. activeTab=1 is the
second tab)
What do you mean that is, if you refresh browser the tab 0 & 1 will be
run together? if yes, it is in your controller not in routes.
def show_details
@all_details = []
for tab_id in 0…params[:activeTab].to_i @all_details << AnyModel.find(tab_id)
end
end
sorry if I feel little bit ambiguous with your problem point.
Hi
I think you did not understand my problem.In short during
redirectiong in the function the activeTab param is visible in the
browser address bar…How can I remove that.
Is there any render :method => ‘post’ or
redirect_to :method => ‘post’
Like that
What about css?
I guess you have tabs something like amazon or every other web site.
When you click on an item to show you want to highlight a tab?
If so you could have a different layout for Show or programitclly give
the tab/list item an id.
Then in you CSS make it look highlighted.
Something like that?
John I
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.