Thanks for the reply, but I think I misphrased my question. If my
"top" document is:
<html>
<head><title>Top</title></head>
<body>
<table>
<tr><td><iframe width="200" height="300" src="frame.htm"
name="n"></iframe></td></tr>
</table>
</body>
</html>
and my frame, "frame.htm" is:
<html>
<head><title>Frame</title></head>
<body>
<script type="text/javascript">
alert(document.title);
</script>
</body>
</html>
I want the alert to say "Frame" not "Top," which is what displays with
the current text or even if I include the suggestion
"alert(top.document.title)". Again, much thanks if someone can crack
this enigmatic problem. -
Mick White <mw******@BOGUSrochester.rr.com> wrote in message news:<sh*******************@twister.nyroc.rr.com>. ..
D. Alvarado wrote: Hello,
I am trying to find the <TITLE> element of my document. Normally
alert(document.title);
works just fine, but when this statement is within a page that is a
frame in a larger document, the above call always returns the title of
the parent (container) page. Is it possible through JS to deduce the
<TITLE> element of the current page, even if that page is a frame?
Much thanks - Dave
alert(top.document.title);
Mick