books1999 <bo*******@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I have framset with leftFrame, mainFrame, TopFrame.
I found this script :
http://www.dynamicdrive.com/dynamici...llapsemain.htm
I wonder if it could be ajusted so that it collapses the same frame
that calls it.
If that's all you want to do, you don't need a stand-alone script, just
insert the necessary code into a suitable link.
These two examples should collapse the lower or rightmost of a pair of
frames respectively, and can be located in either.
<A
HREF='#'onclick='if(document.body)parent.document. body.rows="*,0"'>Collapse<
/A>
<A
HREF='#'onclick='if(document.body)parent.document. body.cols="*,0"'>Collapse<
/A>
I don't know why you'd want to do this, but I suggest you include a
restorative link in the remaining visible frame. The syntax should be
obvious.
Another refinement would be to generate the links with document.write, so
that they don't appear if script is disabled or the required support is
un-available.
if(document.body)
document.write(....)
--
Stephen Chalmers
http://makeashorterlink.com/?H3E82245A
547265617375726520627572696564206174204F2E532E2072 65663A205451323437393134