Memetic, I think we have similar feelings about use of frames, and I would love not to use them here, but the site is for someone that will need to update the site on their own, and who is a complete technophobe.
There are many ways to skin the cat, but iframes allow me to use pages with minimal html, or even notepad/word documents with no html at all, inside a parent page. My technophobe friend can then just create or change simple html pages or notepad/word documents to update the relevant portion of the pages without fear of changing the html coding for the site.
For browsers that do not support iframes I have included all the text and images in the 'Alternative Content' portion of the iframe.
The reason for needing this script is that the home/index page has a different layout to all the others. I could use multiple pages, and multiple iframes, but that is extra work and not quite so neat.
Plus and this is probably the truth of it, I was too stubborn to give up once the problem had present itself.
At long last however I have found a solution. Hot Scripts didn't have the actual solution, but whilst searching their site I did find a cunning little piece of script that assisted greatly (thanks Richard - NAC, Inc).
I post the solution here in case anyone else wishes to use it.
On the index page use the following script within the HEAD section:
***********************
<script language="JavaScript" type="text/JavaScript">
<!--
function loadIframe(iframeName, url) {
if ( window.frames[iframeName] ) {
window.frames[iframeName].location = url;
return false;
}
else return true;
}
//-->
</script>
***********************
The hyperlinks on the index page then need to be in the following form:
***********************
<a href="index2.html?contact.htm">Contact Us</a>
***********************
Where
index2.html is the target parent page and
contact.htm is the page or document to appear in the iframe.
Then on the target page (index2.html) you need first to place the following script in the HEAD section
***********************
<script language="JavaScript">
<!--
var newURL = unescape(location.search.substring(1));
//-->
</script>
***********************
and then change the <BODY> tag so that it is in the following format:
***********************
<body onload="if (newURL !='') parent.text.location.href=newURL">
***********************
where
text is the name of the iframe.
Thank you again for you help and advice.
A much happier WP.
Still as stubborn though!