Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frame Collapsing

Status
Not open for further replies.

hungerf5

IS-IT--Management
Sep 17, 2001
36
US
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=&quot;280,*&quot; frameborder=&quot;NO&quot; border=&quot;1&quot; framespacing=&quot;1&quot; rows=&quot;*&quot; bordercolor=&quot;#CCCCCC&quot;>
<frameset rows=&quot;80,*&quot; frameborder=&quot;NO&quot; border=&quot;1&quot; framespacing=&quot;1&quot;>
<frame name=&quot;topFrame&quot; scrolling=&quot;YES&quot; src=&quot;&quot; >
<frame name=&quot;leftFrame&quot; scrolling=&quot;YES&quot; src=&quot;&quot;>
</frameset>
<frame name=&quot;mainFrame&quot; src=&quot;&quot;>
</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!=&quot;25,*&quot;)
document.body.cols=&quot;25,*&quot;
else
document.body.cols=defaultconf
}
}
// -->}
</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top