473,854 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

make a frame invisible

Hi

I have hunted around for this one but been unable to find any definitive
answer.

I have a simple frameset with one frame above another. by clicking a
checkbox or some such in the lower frame the user can choose whether to have
the upper frame displayed or not.

I have tried frames["upper"].style.display= "none" which looked right
according to the CSS spec but didn't work for me.

I don't want to have to reload the page without a frameset; I want to keep
the frameset in place but the lower frame fills the window and the user
cannot see or navigate to the upper frame. This should work in recent
versions of popular browsers (mandatory IE6 and Firefox)

Can this be done?

TIA

Andy
Jul 23 '05 #1
4 5605
Just off the top of the head, can you change the frame size of the
frame you want to hide, to be 0 (or make the other frame 100%,
whatever)? Can the "Rows" attribute of the Frameset tag be modified to
do this in DHTML? I would go this route.

Jul 23 '05 #2
Andy Fish wrote:
Hi

I have hunted around for this one but been unable to find any definitive answer.

I have a simple frameset with one frame above another. by clicking a
checkbox or some such in the lower frame the user can choose whether to have the upper frame displayed or not.

I have tried frames["upper"].style.display= "none" which looked right
according to the CSS spec but didn't work for me.

I don't want to have to reload the page without a frameset; I want to keep the frameset in place but the lower frame fills the window and the user cannot see or navigate to the upper frame. This should work in recent versions of popular browsers (mandatory IE6 and Firefox)

Can this be done?

TIA

Andy


Remembered this from years past but, no idea how cross-browser it is.
Check it out if you like...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/str***ict.dtd">
<html>
<head>
<title>untitled </title>
<style type="text/css">
</style>
<script type="text/javascript">

function upperF()
{
return [
'<html><head></head>',
'<body style="backgrou nd:coral;"',
'><h2>upper</h2></body>',
'</html>'].join('');
}
function lowerF()
{
return [
'<html><head></head>',
'<body style="backgrou nd:moccasin;"',
'><h2>lower</h2><input type="checkbox" ',
'onclick="top.t oggleUpper(this .checked)">',
' <span id="hs">hide</span> upper',
'</body></html>'].join('');
}

function toggleUpper(bWh ich)
{
document.body.r ows =
(bWhich) ? '0,*' : '20%,*';
lower.document. getElementById( 'hs').innerHTML =
(bWhich) ? 'show' : 'hide';
}

</script>
</head>
<frameset rows="20%,*">
<frame name="upper" src="javascript :top.upperF()">
<frame name="lower" src="javascript :top.lowerF()">
</frameset>
</html>

The relevant code is in toggleUpper, the rest is just for putting
everything in one file. hth

Jul 23 '05 #3
I just dynamically changed my frameset size, hope this helps you, I did
it this way:
parent.document .body.rows="100 %,*"

This hid my bottom frame. It looks like the bottom 50% of my
screen is just whitespace.

Jul 23 '05 #4
<br************ *@glic.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
I just dynamically changed my frameset size, hope this helps you, I did
it this way:
parent.document .body.rows="100 %,*"

This hid my bottom frame. It looks like the bottom 50% of my
screen is just whitespace.


Thanks Bruce (and RobB for the other reply)

I was able to get about 90% most of the way with DHTML, but I came unstuck a
bit with the borders. I need to have the frame border visible and resizable
when in 2-frame mode, and to look as if there is no frame there at all (i.e.
no frame borders) when in 1-frame mode.

After a lot of faffind about, I wasn't able to get something that looked
seamless in different browsers, so I have decided to reload the frameset
when when switching modes. At least I know this will be browser-independent.

Andy

Jul 23 '05 #5

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

Similar topics

5
2435
by: Leon | last post by:
Hi, Could you give me some suggestions or ideas for the loading speed difference between using one single frame for a web page and not using frame for this page? Thank you very much.
3
6832
by: Susan Bricker | last post by:
Greetings. I have three forms that are open at the same time. They are related and cascading. The first form (frmEventAdd) is the anchor. Each event can have many Trials. The second form is frmTrialInfo. Each Trial can have three Classes. The third form is frmClassInfo. These forms are used for update and adding new records. The user displays an event for update (frmEventAdd). Then clicks on a button to display the Trials for that event...
0
936
by: tham | last post by:
hi, my mdi app has the concept of "Project File" which is the default document. i wanna leverage MFC doc/view architecture but i dont wanna create a CMDIChildFrame for the project file... how to make the frame invisible...
3
2165
by: Richard | last post by:
After printing a userlist to a Datagrid i want some names not to be shown. I want to know how i can make a entire datagrid row invisible. I suspect its something with the OnItemDatabound but i am kinda stuck there. but this is basicly what i want. if Username = "Deleted_User" then 'make entire table row invisible. End if
6
1667
by: Yves-Alain.Nicollet | last post by:
Hi. I have a frameset with 3 frames that look like a T, with the top frame containing buttons like a toolbar, the left frame usually containing a dynamic TOC and the right frame containing the documents to view. In the toolbar, I have a button that starts a search engine which results I want to display in the left frame, hiding the TOC. Two buttons in the toolbar should help choose to display either the TOC or the search results in the...
2
1138
by: Kevin | last post by:
I have a few frame controls on my form in my Windows Forms app. I have a Listbox that stretches over a few of the frame controls but is invisible until the user click a button. The problem is, when I try to put the Listbox over the frames in the designer view, the Listbox becomes a member of one of the frames and shows only a tiny bit of the Listbox. Can I prevent the frame from taking the Listbox?
7
7025
by: Nader | last post by:
It's easy to make the last row in a datagrid (filled with a table) invisible: datagridObject.Rows.Visible = false BUT if 'i' is not the last row then things go wrong. I even tried: for (int i = datagridObject.Rows.Count - 1; i >= 0; i-- ) {
5
1465
by: Hank Mishkoff | last post by:
Is there any way to use JavaScript to determine how much text will fit into a non-scrolling browser frame? I have a non-scrolling frame in which I want to insert some text. I know that the text is too large to fit entirely into the frame, so I'd like to insert only the portion of the text that will fit into the frame. Is there any way to use JavaScript to do this? (The text could be any font and any size, and the frame
0
9899
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
9750
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
11024
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10362
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9510
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
7909
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
7076
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();...
1
4550
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
2
4149
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.