Scenario: I have a frameset with two frames, “headFrame” and “contentFrame”.
Project: headFrame is static with the navigation for the site. It also has a space to display the current page’s title. This title should be generated dynamically by “reading” the document.title property from contentFrame.
Result: My first attempt was to write:
<script language = “javascript”>
document.write(parent.contentFrame.document.title)
</script>
but nothing was displayed. I assume that it has to do with the fact that the script is running before contentFrame is generated.
Is there a better way to dinamycally generate text reading other frame’s attributes or properties?