Tom Braun wrote:
I need to monitor if someone clicked on some (any) link in a
subframe. Due to certain restrictions, the only place I can put some JavaScript
is in the main (frameset) page, though.
Your exact meaning was unclear to me, but perhaps you are looking
for something like the below example (the important part is that
onClick="parent.clickFunc(this);return false;").
That having been said, I am curious about one thing in the example
below. In my FF 1.1, the link is not underlined if I omit the
<u> ... </u>. Have I missed something?
Csaba Gabor from Vienna
<html>
<head>
<title>Frame clicks</title>
<script type='text/javascript'>
function clickFunc(oLink) {
alert(oLink.id + " has been clicked!"); }
</script>
</head>
<frameset>
<frame src="javascript
:'<html><head><title>Inner</title>
</head><body>
<a href="nothing.htm" id=foo
onClick="parent.clickFunc(this);return false;">
<u>Try me</u></a></body></html>'">
</frame>
</frameset>
</body>
</html>