Let's say I have an embedded web page on a website (Example: www.en.wikipedia.org/wiki/Pulsar). The user than clicks on a hyperlink inside the article (Ex: https://en.wikipedia.org/wiki/Extrasolar_planet).
I want to have a frame which displays the name of the article (in this case, "Extrasolar planet") when the user clicks an entry from the original article ("Pulsar")
How do I know what the user has clicked?
EDIT: After seeing many examples, I tried to do this instead, but it doesn't quite work.
<iframe width="940" height="550" src="http://en.wikipedia.org/wiki/Special:Random"> </iframe>
<script>
(document.getElementsByTagName('iframe').contentWindow.document).keydown = function() {
alert("Hello World")
})
</script>