AllExperts > DHTML 
Search      
DHTML
Volunteer
Answers to thousands of questions
 Home · More DHTML Questions · Answer Library  · Encyclopedia ·
More DHTML Answers
Question Library

Ask a question about DHTML
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Andrew Hoffman
Expertise
I can field just about any question within this topic ranging from JavaScript to CSS, the two ingredients of DHTML. I`m very interested in the W3C and its validation rules for HTML, XHTML, and CSS, and enjoy answering questions of this type as well. I detest sleep and respond at all hours of the day or night.


Experience
Experience in the area
I've been working with DHTML and CSS for 7 years now and build/maintain websites of my own that implement DHTML navigation.

What I'm doing now
My contract with Microsoft has ended and I am working for myself once again. Please contact me for any front-end work at antibland@gmail.com

 
   

You are here:  Experts > Computing/Technology > HTML/XML > DHTML > Removing Frames

DHTML - Removing Frames


Expert: Andrew Hoffman - 9/5/2007

Question
Hi,

My web page has two frames a search navigation frame across the top and the results content frame below.

I wish to create a button in the navigation frame that will allow a user to get rid of a navigation frame, and opening up to the full screen the content frame.

How can this be done?

Thanks

Ben

Answer
Hi Ben, I'm assuming you have a basic understanding of JavaScript.  Just make sure to place the function below somewhere between a <script> tag within <head> or in an external js file.

The Function

function removeFrames() {
if (top.location != self.location) top.location = self.location;
}

The Link

<a href="javascript:void(0)" title="Remove frames" onclick="removeFrames()">Remove Frames</a>

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.