I want to be able to toggle a javascript function that opens a certain tab on my page when the page loads. However I only want this function to run automatically when coming from another page.
For example:
Page A has the function that opens said tab, which is triggered when clicking on a button normally.
I want the user to click a button on page B and redirect to page A, where the function on page A automatically triggers.
However if the user reaches page A from anywhere but page B I do not want this function to trigger automatically.
This is the best way I can describe it, any help would be great. (I should also mention this is being done is ASP.NET MVC4)