This is what the link looks like on page 1:
<li id="click1">
<a href="products.htm#test4Handle1">TNT Cable System</a>
</li>`
This is what I want to trigger on page 2:
<a name="test4Handle1">
<button onclick="$('#test4Handle1').click()">TNT Cable System</button>
</a>
my attempt at jquery
$("test4Handle1").observe('domready',function() {
document.getElementById("test4Handle1").click();
});
What page should have the javascript page 1 or 2?
If I understand you correctly, I would have to say that what you are looking for is not possible. Scripts are jailed to the pages on which they are loaded in. While it is possible for them to trigger the creation of new windows, it is not possible to interact with those windows, their DOM's and the scripts they are running.
On Page 2, paste this code
Check if this helps you. Following is one example I got working
Here is Page1.html
And here Page2.html