Automatically click a link and navigate to another page
June 19, 2013 in answer
ANSWER:
Normally, clicking on an anchor link takes you somewhere else inside the page and changes the anchor link to foo.php#bar (where bar is the name of the anchor), so this behavior is by design.
Perhaps you can configure your tracker to track these changes? Clicking on an anchor fires up the hashchange event:
I need to update my page using Anchor (#) in URL
You can change your browser’s URLs programmatically via the HTML5 pushState() method, i.e. the history API.
Here are some examples of utilizing the HTML history API:
- http://diveintohtml5.info/history.html
- https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Manipulating_the_browser_history
Check these links for ways to utilize the hashchange event:
- https://developer.mozilla.org/en-US/docs/Web/API/window.onhashchange
- http://oshyn.com/_blog/General/post/JavaScript_Navigation_using_Hash_Change/
Filippos Karapetis from http://stackoverflow.com/questions/17193477

New Comments