I can see your problem, I am no expert at JavaScript either but, I figured this out ONLY works in IE6. Here is a template for your content page (I used your work.htm file as an example) that you want to invoke the frameset page with it (the content page) in the frame called 'mainFrame':
HTML Code:
<html>
<head>
<title>Work</title>
<script type="text/JavaScript">
if (window == top) window.location.replace("http://www.organicmetal.co.uk/pages/index2.htm?var1=http://www.organicmetal.co.uk/pages/work.htm");
</script>
</head>
<body>
Work Content
</body>
</html>
and your index2.htm could look like this:
HTML Code:
<html>
<head>
<form name="recieve">
<input type="hidden" name="var1">
</form>
<script type="text/JavaScript">
if (document.all){
var locate = window.location;
document.recieve.var1.value = locate;
var text = document.recieve.var1.value;
function delineate(str) {
theleft = str.indexOf("=") + 1;
theright = str.indexOf("&");
return(str.substring(theleft, str.length));
}
url=delineate(text)
}
function refreshFrame() {
if (document.all){
if(window.location!=url)
frames['mainFrame'].window.location.replace(url);
}
}
</script>
</head>
<frameset rows="160,*" cols="*" framespacing="0" frameborder="NO" border="0" onload="refreshFrame()">
<frame src="frameTop.htm" name="topFrame" scrolling="NO" noresize>
<frameset rows="*,19" cols="*" framespacing="0" frameborder="NO" border="0">
<frameset rows="*" cols="157,*" framespacing="0" frameborder="NO" border="0">
<frame src="frameLeft.htm" name="leftFrame" frameborder="no" scrolling="no" noresize>
<frame src="../home.php" name="mainFrame" frameborder="no" scrolling="yes" noresize>
</frameset>
<frame src="frameBottom_LOADER.htm" name="bottomFrame" scrolling="NO" noresize>
</frameset>
</frameset>
<noframes>
<body>
No Frames Content
</body>
</noframes>
</html>
Be sure to notice the onload event in the first framset tag.
Bookmarks