Is it possible to have an onclick event happen after a page redirect? I have my Java files setup so there is a smooth scroll to "anchor2" after loading the new page but I can't for the life in me find a way to get the onclick function (Another java) to work on the new page.
<a href="portfolio.html#anchor2" onclick="javascript:showAndScroll(1, 3)" title="">Link</a>
The following works on the portfolio.html page to open/close sections onclick
<a onclick="javascript:showAndScroll(1, 3)" title="">Link</a>
But I want this functionality when on a different page to portfolio so that it links to portfolio.html and the ID (smooth scrolls to #anchor2) and then the onclick even to happen?
Here is the Fiddle
Is this possible?
javascript:pseudo protocol