aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to retain active tab-when user navigates to other control in a page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to retain active tab-when user navigates to other control in a page?" Watch "how to retain active tab-when user navigates to other control in a page?" New topic
Author

how to retain active tab-when user navigates to other control in a page?

Aditi Gandy
Ranch Hand

Joined: Apr 23, 2008
Posts: 37
Hi, I have a web page with RHS part with tabbed menu and another LHS part=event calendar. There is no link with event calender and tabbed menu except that they both lie on the same page.

My problem is:

As soon as page loads,

1) When I click on default tab first, Nothing will change in the page.(working fine)

2)When I click on any other tab(except default) first, and then move to event calendar or any other control in the page, which ever tab is active is getting deselected.

3) When page loads, if I click on event calendar first, default tab is not getting affected. (it will be active till I click on it or any other tab--working fine)

Don’t know where it is going wrong.
My expectation is:
1) As soon as page loads, I will click on any other tab (tab3)..Then I move to event calendar to see events on next month. Even after clicking event calendar, I want tab3 to be active... how to do it???

Please help.
Regards,


Thanks & Regards,
Author
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Magic?

We do not know how your page is designed. If you are posting back the page, you need to make your page smart enough to figure out what the last visible tab was and set it with either your backend code or with JavaScript. You may have to result to posting hidden form fields with your submission or storing values in cookies.

Eric
Aditi Gandy
Ranch Hand

Joined: Apr 23, 2008
Posts: 37
Thanks Eric.

It is not the case with only event calender, if i click anywhere in the page, tab is getting deselected. I am not using any forms. It is just a html page...
If your answer is the solution, would like to know how do i sotre data in hidden variables where i am not using any form fields.

please help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to retain active tab-when user navigates to other control in a page?