I've implemented a JS function to collapse a left frame when a user double clicks it.
Now I've added a top frame in the left frame and would like to be able to collase the top frame. How would I go about doing this.
Process:
User double clicks leftFrame which executes expando
expando calls expandf which in the frameset.
expandf either expands or collapses the frame based upon its current size.
Frame layout:
<frameset cols="280,*" frameborder="NO" border="1" framespacing="1" rows="*" bordercolor="#CCCCCC">
<frameset rows="80,*" frameborder="NO" border="1" framespacing="1">
<frame name="topFrame" scrolling="YES" src="" >
<frame name="leftFrame" scrolling="YES" src="">
</frameset>
<frame name="mainFrame" src="">
</frameset>
LeftFrame Function:
<SCRIPT language=JavaScript1.2>
<!--
if (document.all)
window.parent.defaultconf=window.parent.document.body.cols
function expando(){
window.parent.expandf()
}
document.ondblclick=expando
-->
</SCRIPT>
FrameSet Function:
<SCRIPT language=JavaScript1.2>
<!--
defaultconf=''
function expandf(){
if (document.all){
if (document.body.cols!="25,*"
document.body.cols="25,*"
else
document.body.cols=defaultconf
}
}
// -->}
</SCRIPT>
Now I've added a top frame in the left frame and would like to be able to collase the top frame. How would I go about doing this.
Process:
User double clicks leftFrame which executes expando
expando calls expandf which in the frameset.
expandf either expands or collapses the frame based upon its current size.
Frame layout:
<frameset cols="280,*" frameborder="NO" border="1" framespacing="1" rows="*" bordercolor="#CCCCCC">
<frameset rows="80,*" frameborder="NO" border="1" framespacing="1">
<frame name="topFrame" scrolling="YES" src="" >
<frame name="leftFrame" scrolling="YES" src="">
</frameset>
<frame name="mainFrame" src="">
</frameset>
LeftFrame Function:
<SCRIPT language=JavaScript1.2>
<!--
if (document.all)
window.parent.defaultconf=window.parent.document.body.cols
function expando(){
window.parent.expandf()
}
document.ondblclick=expando
-->
</SCRIPT>
FrameSet Function:
<SCRIPT language=JavaScript1.2>
<!--
defaultconf=''
function expandf(){
if (document.all){
if (document.body.cols!="25,*"
document.body.cols="25,*"
else
document.body.cols=defaultconf
}
}
// -->}
</SCRIPT>