Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5967725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:59:08+00:00 2026-05-22T19:59:08+00:00

I try to enable a brwoserback button for my tabs. But the problem is

  • 0

I try to enable a brwoserback button for my tabs. But the problem is that in some cases the the hash dissapears.

function showTab1(){
    window.location.hash = 'tab1';
    oldHash = window.location.hash;
    //showTab1
}
function showTab2(){
    window.location.hash = 'tab2';
    oldHash = window.location.hash;
    //showTab2
}
function checkBrowserBackButtonInHome(){

    setInterval(function(){
        if(window.location.hash != oldHash) {
            //Do something
        }
    }, 50);
} 
showTab1();

and than I click on showTab2. And when I click on the browser back button the hash dissapears. index.php instead of index.php#tab1

EDIT:

It seems like this only happens in chrome web browser

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:59:09+00:00Added an answer on May 22, 2026 at 7:59 pm

    try using this instead of the interval:

    $(window).bind('hashchange', function() {
      //Do something
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I disable a button with [myButton setEnabled: NO] . Then, I try to enable
try: spam.foo except AttributeError: do_somthing() (Is it wise to check an attribute like that
I disabled the tab like this: $(#tabs).tabs({ disabled: [1, 2] }); But when I
try { Properties props = new Properties(); props.put("mail.smtp.starttls.enable", "true"); props.setProperty("mail.transport.protocol", "smtp"); props.setProperty("mail.smtp.host", "smtp.gmail.com"); props.put("mail.smtp.auth",
When I try to use imap_open I get the following error: Warning: imap_open() [function.imap-open]:
When I'm trying to enable auto_increment on a column in phpmyadmin, but I always
I try to use the following technique in order to enable/disable the shadow effect
I try to call setFrame:display:animate: on my NSWindow and doesn't do anything, but if
I logged into my PC with administrator account. When I try to enable the
I try to modify the metabase of IIS6, I've cheched the checkbox to enable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.