javascript - Firefox and window.location.hash -


I'm currently testing an AJAX app in Firefox 3.6.15 which changes the window.location.hash for navigation Uses the page when I need the page

I have a link that does this:

  var editCategoryClick = (function (class id) {return function () {If (window.location.hash! = Window.location.hash + '/' + Category ID) {window.location.hash = window.location.hash + '/' + Category ID;}}}) (Category. Id);   

This works great, I end up with this result, however, if I go to the browser navigation bar manually and change '# numbers / categories' then' # Numbers / categories "# # Numbers / categories / EBO 38179-D492-4 B-9-BA 66-1 BF 4C-3571 FB". #number / categoriesx ', when I run the click function, the hash will not be updated.

I am not in other browsers for this problem, I am testing Chrome, Safari, i.e., I, I 88. Only firefox shows this behavior, I know its a rare case, but its still a UX problem.

Thanks in advance for any help.

  1. Attach an onhashchange event listener to check the hash change For an unsupported browser, use setInterval to detect changes.
  2. If you can use something then why revise the wheel again?

Comments