Solved

onMouseOver Frame expanse/collapse

Posted on 1998-03-02
6
294 Views
Last Modified: 2012-05-05
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
Comment
Question by:kmbac
6 Comments
 

Author Comment

by:kmbac
Comment Utility
Adjusted points to 250
0
 
LVL 5

Expert Comment

by:Christian_Wenz
Comment Utility
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
 
LVL 5

Expert Comment

by:julio011597
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 10

Accepted Solution

by:
kollegov earned 250 total points
Comment Utility
<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
 
LVL 5

Expert Comment

by:Christian_Wenz
Comment Utility
nice script! :-)
0
 

Author Comment

by:kmbac
Comment Utility
Thanks, kollegov.  I never thought about using layers.  This really is a nice script.  Thanks again.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now