You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Remember Tab on postback Created Dec 18, 2009

This thread is solved

Views: 2871     Replies: 4     Last reply Sep 7, 2010  
You must login first before you can use this feature

fizzystutter

Posts: 3

Registered:
Dec 14, 2009

Remember Tab on postback

Posted: Dec 18, 2009

Hi,

I've implementated the Tab function on an asp.net page and wrapped it all up with a .net ajax update panel.

There are 2 tabs on the page as well as an update function that amends data to a database.

If I click on the second tab and then I click the update button (not inside the tab) and perform a postback, the first tab is then selected.

Is there way to get the script to remember which tab is currently live and then keep it live when a postback is performed ?

custa1200

Posts: 54

Registered:
Oct 31, 2009

» Remember Tab on postback

Posted: Dec 21, 2009

Reply to: Remember Tab on postback, from fizzystutter
I would seriously avoid using update panels with jQuery. There is a massive memory leak with them where we had to roll back our implementation because of it.

dakor

Posts: 1

Registered:
Dec 23, 2009

» Remember Tab on postback

Posted: Dec 23, 2009

Reply to: Remember Tab on postback, from fizzystutter
I also have this issue. I am not using ajax but just straight form update.

I'm using the code from here:http://flowplayer.org/tools/tabs.html

I have tried this but it doesn't work
var $tabs = $('ul.tabs').tabs(); 
$tabs.tabs('select', 2); 

In one of the tabs there is a form that is submitted to the same page. I need the tab opened after submission.

BarryC

Posts: 2

Registered:
Sep 2, 2010

Remember tab on postback doesn"t work in IE

Posted: Sep 2, 2010

Reply to: » Remember Tab on postback, from dakor
It would have helped me out a lot if this post was answered. I'm busy with a project that is using the jquery.tools tabs tool and with the following code (using a hidden field on the page):


    $("ul.tabsScenario").tabs("div.panes > div");
    var tabIndex = $('#ctl00_ContentPlaceHolder1_EnInDeToekomst1_HiddenFieldTabIndex').val();
    if (tabIndex) {
        $("ul.tabsScenario").tabs('select', tabIndex);
    }

the tab index is remembered when the web app is running under FireFox, Chrome or Safari, but not in IE7 or IE8. It's unacceptable that the web app doesn't work under IE. I've tried everything but cannot get it to work under IE. The jquery.ui tabs tool does work properly under IE but the way we implemented the tabs would mean that we would have to refactor the html and css too and I would like to avoid that. I hope someone knows how to get this working under IE.

BarryC

Posts: 2

Registered:
Sep 2, 2010

» Remember tab on postback doesn"t work in IE

Posted: Sep 7, 2010

Reply to: Remember tab on postback doesn"t work in IE, from BarryC
My problem is solved (but not in this forum). For the solution follow this link:
http://forums.asp.net/p/1599404/4064850.aspx