Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Stay with the active tab after refresh

Jian-cdoAug 24 2016 — edited Aug 25 2016

Hello,

How to stay with the current tab after page refresh?  Some articles don't suggest to use cookie since it adds overhead to the workload.  According to the following link, seems using Jquery should accomplish the task easily.  While I have the dumb question, where I should put the code.  Say, for the region that has the tabs, I gave the static ID as "P8_Site_Details", then where should I put these code to: HTML header, Javascript, or individual script?  Seems none of them works for me.  Thanks very much!

jquery ui tabs no longer supporting cookie? now what? - Stack Overflow

==========

    currTabIndex=sessionStorage['P8_Site_Details'];

    $("#P8_Site_Details").tabs({

        active: localStorage.getItem("currentTabIndex"),

        activate: function(event, ui) {

            localStorage.setItem("currentTabIndex", ui.newPanel[0].dataset["tabIndex"]);

        }

    });

===========

This post has been answered by Pavel_p on Aug 25 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2016
Added on Aug 24 2016
3 comments
1,400 views