• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

onMouseOver Frame expanse/collapse

Is there any way to expand a frame using onMouseOver, kind of like the way that the Windows95 taskbar does whenever it is hidden? And then have it collapse onMouseOut?
0
kmbac
Asked:
kmbac
1 Solution
 
kmbacAuthor Commented:
Adjusted points to 250
0
 
Christian_WenzCommented:
what do you mean with "expand a frame"? You can change a frame's content, you can use layers to generate a Win95-like effect (NN4 only)...
0
 
julio011597Commented:
As Christian_Wenz has pointed out, there's no way to resize a frame, so you have a couple of options:

1. Change frame's content:

say you have something like:

home.htm: the top window
<FRAMESET ROWS="60,*">
  <FRAME SRC="Controls.htm">
  <FRAME NAME="MainArea" SRC="Client.htm">
</FRAMESET>

Client.htm: the single page you show when Taskbar is hidden;

Double.htm:
<FRAMESET COLS="*,*">
  <FRAME SRC="TaskBar.htm">
  <FRAME SRC="Client.htm">
</FRAMESET>

Given this structure, and a button in the Contros.htm page to show/hide the TaskBar, you just attach this code to the OnClick event of the button:

--//--
var toShow = true;

function handleClick() {
  if(toShow) top.frames["mainArea"].location = "Double.htm";
  else top.frames["mainArea"].location = "Client.htm";
  toShow = !toShow;
}
--//--

2. Use layers... NN4 only.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
kollegovCommented:
<html>
<script>
var wname=window.name;
var state;
function max(e)
{if((state!="max")&&(window.name!="locked"))
  {state="max";
   window.name="locked";
   window.resizeTo(500,400);
   setTimeout("window.name=wname",200);
  }
}
function min(e)
{if((state!="min")&&(window.name!="locked"))
  {state="min";
   window.name="locked";
   window.resizeTo(200,200);
   setTimeout("window.name=wname",200);
  }
}

</script>


<body  onMouseOver="max()" onMouseOut="min()">
<layer ID="mylayer" onMouseOver="max()" onMouseOut="min()" width="100%" height="800%">
document
<layer>
</body>
</html>

Christian_Wenz, I guess kmbac supposed size changing.

So I'm posting solution how this can be done with
JavaScript 1.2 and layers
Sorry, you need to have layer to catch onmouse over/out
events in NN4, MIE4 can catch this events for body object.
but do not want to catch it space outside layer, si this handlers used twice!
This will work only for NN4 and MIE4.

Script checked with NN4,MIE4

0
 
Christian_WenzCommented:
nice script! :-)
0
 
kmbacAuthor Commented:
Thanks, kollegov.  I never thought about using layers.  This really is a nice script.  Thanks again.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now