473,664 Members | 2,728 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 5596
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
2424
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
6822
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
928
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
2156
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
1660
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
1132
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
7015
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
1450
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
8348
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
8778
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8636
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
7375
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...
0
4185
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
4351
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2764
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
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.