This is probably a really silly question, but I can't find it online anywhere and I've been looking for at least an hour.
I have a link <a href="MusicMe.html" id="instrumentsNav">Instruments</a>
which I want to get the ID of it once clicked, as I need to pass some variable to the page I am opening to know that the instruments link was clicked. This is being called from productInformation.html
I have also tried doing <a href="#" onclick="instrumentsClick()" id="instrumentsNav">Instruments</a>
and then in my JavaScript, window.open("MusicMe.html", "_self");
and then tried passing a variable that way, but still absolutely no luck. Any help as to how I would pass a variable back to the page when it opens would be brilliant.
Once it opens, I am using the variable to set the ID of an element so it only displays a certain set of the information, which is working on it's own, but when I go back to try and call it, it's always thinking it is showing them all as I cannot work out how to set the variable to define it. Unfortunately I need to use JavaScript not PHP.
Thanks.