473,588 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamically changing frameset layout (closing frames, reopening frames, etc)

JP
Hi,

How can I create a dynamic frameset whose content changes based on
user inputs?

Specifically, how do I toggle a frame within a frameset? How can I
allow a user to "close" or "dock" a frame by clicking on some button
and let the parent update its frameset layout?

What I've been trying to do is for the child frame to send a message
to the parent, noting that a "close" event is issued, and parent
updates the frameset html... however that's just not working out, as
in I cannot seem to modify *only* the frameset parts... the whole
parent page seems to lose out (so other variables within the parent
page are lost with the new frameset html).

How can I achieve a frameset that allows docking frames??

Thank you,

-jp
Jul 20 '05 #1
1 10994


JP wrote:
Hi,

How can I create a dynamic frameset whose content changes based on
user inputs?

Specifically, how do I toggle a frame within a frameset? How can I
allow a user to "close" or "dock" a frame by clicking on some button
and let the parent update its frameset layout?

What I've been trying to do is for the child frame to send a message
to the parent, noting that a "close" event is issued, and parent
updates the frameset html... however that's just not working out, as
in I cannot seem to modify *only* the frameset parts... the whole
parent page seems to lose out (so other variables within the parent
page are lost with the new frameset html).

How can I achieve a frameset that allows docking frames??


With IE6/Win and with Netscape 7 the following allows showing/hiding the
left frame:

<html>
<head>
<title>toggli ng a frame in a frameset</title>
<script type="text/javascript">
function toggleFrame () {
top.leftFrameVi sible = !top.leftFrameV isible;
parent.document .body.cols = top.leftFrameVi sible ? '50%, *' : '0, *';
}
</script>
</head>
<body>
<input type="button" value="toggle left frame"
onclick="toggle Frame();">
</body>
</html>

<html>
<head>
<title>Toggli ng a frame</title>
<script type="text/javascript">
var leftFrameVisibl e = true;
</script>
</head>
<frameset cols="50%, *">
<frame src="test200307 07.html">
<frame src="test200307 07.html">
</frameset>
</html>

As far as I remember it doesn't work with Netscape 6 as the dynamic
change of rows/cols has been implemented later.
And it doesn't work with Opera 7, the frame size is not changed at all.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3378
by: MP Multimedia | last post by:
Hello everyone, I need help. I'm using a hierarchical menu made in javascript. When I used it in a one frame page, it came out fine. But now I need to change my page to 3 frames: a top frame, a left frame and a right frame. The menu is on the top frame and when hovering the categories, the sections appear under the left and right frame. How do I solve that problem? (I use Dreamweaver.) Thanks for all your answers.
2
11000
by: Don Schneider | last post by:
I tried to setup a frameset which consists of 4 different subframes. Each of these subframes should fetch a different web page from the internet and display it completely (!). BUT: the vertical size should be undefined. Depending on the retrieved (lets say 2nd) webpage the frame should take as much space as it needs to display the whole sub web page without vertical scrollbar. If I implement it like below a vertical scrollbar for each of...
24
3489
by: Charles Crume | last post by:
Hello; My "index.htm" page has 3 frames (content, navigation bar, and logo). I set the "SRC" of the "logo" frame to a blank gif image and then want to change it's contents after the other two frames have been loaded by using a javascript statement from the "navigation" frame, as shown below: top.window.ccs_logo.src = 'images/ccs_logo.gif'; alert(top.window.ccs_logo.src);
1
2752
by: Julius Mong | last post by:
Dear all, I have the following: <html> <head> .... </head> <frameset ...> <frame .../> <frameset name="page" rows="60,*" ...> <frame src='top.html' .../>
6
56619
by: Nancy Carter | last post by:
I'm trying to set the background color of a frameset to black. The following code doesn't work in either IE 6.0 or Firefox. Any ideas why? <frameset bgcolor="#000000" frameborder="0" border="0" cols="240,*"> <frame name="links" scrolling="no" noresize target="contents" src=""> <frameset bgcolor="#000000" frameborder="0" border="0" rows="135,*"> <frame name="topbanner" scrolling="no" src="">
10
1746
by: IntraRELY | last post by:
I am building an Intranet application and is more of an "Application" vs. a typical "Web Application" or "Web Site". Using a FRAMSET seems like it has many benefits and gives mainly the feel of quicker access and a more streamlined application. However, am I sure you know of the drawbacks, for instance F5 to refresh (which loads the default page), I know I can work around this, but wanted to know what may suite me best in my scenario. I...
4
1306
by: Fredrik Melin | last post by:
Have anyone seen a third party visual HTML Frameset ActiveX or .NET component? I need to define frames (add/remove), visually change sizes etc. Not needed to be free or anything, but I have googled for hours now finding nada. Regards Fredrik
6
3214
by: =?Utf-8?B?ZHNoZW1lc2g=?= | last post by:
Hello, I have a windows form with a TreeView control. When I first open the tree all nodes are colapsed. Then, I expand some of them and close the form. When I call Form.showDialog() once again all nodes are collapsed again. I would like the layout to be saved (nodes which I expanded should stay expanded). I don't change the ImageList, Scrollable, CheckBoxes or StateImageList properties of the control between closing and reopening the...
5
9266
by: Yun | last post by:
I have a frameset initially loaded to a page <frameset id=SV name=SV></frameset> Now I want to use JavaScript to dynamically add frames to this frameset. I have tried to use code like "document.frames.SV.innerHTML = framedefinition" Nothing worked. How do I achieve this goal with JavaScript?
0
7929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7862
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
6634
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5729
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3847
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2372
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1459
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.