R
relaxedrob
Hi All!
I have a frameset document and I want each mainFrame document to have
the following ability:
- be viewed by itself (i.e. without frames if within frameset).
- be viewed within frame (i.e. put back in the frameset if not within
frameset).
I have written the following so far:
<script type="text/javascript" language="JavaScript">
<!--
function withFrames()
{
if (parent.frames.length == 0) {
parent.location.href='/RobertMarkBram/index.htm';
// parent.mainFrame.location.href=document.location.href;
}
} // end withFrames function
function withoutFrames()
{
if (parent.frames.length != 0) {
parent.location.href=document.location.href;
}
} // end withFrames function
document.write("<p onClick='withFrames();'>View with frames.</p>");
document.write("<p onClick='withoutFrames();'>View without
frames.</p>");
-->
</script>
My problem is to get the 'target' page loaded back into mainFrame..
You can see my attempt here:
http://phd.netcomp.monash.edu.au/RobertMarkBram/phd/proposal/index.htm
Any help would be most appreciated!
Rob
I have a frameset document and I want each mainFrame document to have
the following ability:
- be viewed by itself (i.e. without frames if within frameset).
- be viewed within frame (i.e. put back in the frameset if not within
frameset).
I have written the following so far:
<script type="text/javascript" language="JavaScript">
<!--
function withFrames()
{
if (parent.frames.length == 0) {
parent.location.href='/RobertMarkBram/index.htm';
// parent.mainFrame.location.href=document.location.href;
}
} // end withFrames function
function withoutFrames()
{
if (parent.frames.length != 0) {
parent.location.href=document.location.href;
}
} // end withFrames function
document.write("<p onClick='withFrames();'>View with frames.</p>");
document.write("<p onClick='withoutFrames();'>View without
frames.</p>");
-->
</script>
My problem is to get the 'target' page loaded back into mainFrame..
You can see my attempt here:
http://phd.netcomp.monash.edu.au/RobertMarkBram/phd/proposal/index.htm
Any help would be most appreciated!
Rob