Forum Moderators: open
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Philip Internet Access Explorer 12.0</TITLE>
</HEAD>
<!-- This file must be named index.html and the other frame files linked to it -->
<FRAMESET ROWS="48, *, 0" ID="TOOL">
<FRAME NAME="topfrm" SRC="topbar.htm" scrolling="no" border="1" noresize>
<FRAMESET ID="FSet" COLS="0,*">
<FRAME NAME="fav" SRC="M.htm" noresize>
<FRAME NAME="browseframe" ID="browseframe" SRC="about:home">
</FRAMESET>
<FRAME NAME="address" SRC="Address.html" scrolling="no" border="1" resize="yes">
</FRAMESET>
</HTML>
First of all: Welcome to Webmaster World!
As for your question, I can think of two different ways to do it.
One method is to push the title from the document contained in browserframe to the parent window. To do so, add the following code to the head of the html document contained in browserframe:
<script type="text/javascript">
<!--
function setParentTitle(){
var curTitle='My New Title!'
//or var curTitle=document.title if you want to push the actual title
parent.document.title=curTitle
//-->
Then attach the setParentTitle() function to the body load event of the html document contained in browserframe:
<body onload="setParentTitle()">
The other method is to pull the title of the document contained in browserframe from the containing frameset document. To do this, add the following to the head of the frameset html document:
<script type="text/javascript">
<!--
function changeTitleFromFrame(){
var curTitle=window.frames['browseframe'].document.title
document.title=curTitle
}
//-->
</script>
Then attach the changeTitleFromFrame() function to the load event of the browserframe frame in the frameset html document:
<FRAME NAME="browseframe" onload="changeTitleFromFrame()" id="browseframe" SRC="blah.htm">
Hope this helps,
ajkimoto
I see. So you want to be able to access the DOM of the document contained in browseframe from a script contained in topfrm?
Try putting this in the document contained in topfrm:
<script type="text/javascript">
<!--
function getDOMStuff(){
var curTitle=parent.frames['browseframe'].document.body.title
var curHTML=parent.frames['browseframe'].document.body.innerHTML
alert(curTitle)
alert(curHTML)
}
//-->
</script>
<style type="text/css">
</style>
</head>
<body>
<button onclick="getDOMStuff()">Access DOM of doc in browseframe</button>
</body>
Does this give you what you need?
ajkimoto