Solved

Frame Resize with Javascript 1.2

Posted on 1998-08-12
4
418 Views
Last Modified: 2012-05-04
Is it possible to resize frames using an onClick event?  I am using Javascript 1.2, and I want to use a button on a main frame to resize another frame.  I have three frames, a top frame and two bottom frames, left and right.  I want to use a button on the top frame to minimize the left frame and maximize the right frame.  Is this possible?
0
Comment
Question by:justinkerns
  • 2
  • 2
4 Comments
 

Author Comment

by:justinkerns
ID: 1268190
Edited text of question
0
 
LVL 2

Accepted Solution

by:
hboys earned 100 total points
ID: 1268191
The easiest way to achieve this would be to have 2 seperate framesets.

The main frameset having a top and a bottom frame. The top frame would have as its default opening page the same as you would put in your existing setup i.e. the 'main page' with the buttons on it.

The bottom frame (instead of having 2 frames at the bottom would have only 1 at this time) would have as its default page another frameset with 2 frames, a left and a right frame. This frameset would have as its default pages the bottom left and bottom right pages that you mentioned in your original setup.

When you want to minimize one frame and maximize the other you would simply replace the frameset in the bottom frame of the main frameset with the page that you whish maximized and vise versa.

The setup for this would be:-

Frameset1.html(main frameset) contains 2 frames top(main page) & bottom.
The bottom frame would contain Frameset2.html.

Frameset2.html would contain 2 frames left and right. the left frame would contain the page that you would have in the bottom left frame in your old setup. The right would contain the bottom right.

To minimize the "bottom left" frame you would:
replace the page in frameset1.html's bottom frame, from frameset2.html to the page that you have in frameset2.htmls' left frame.

Hope all this makes sense! if not post a  comment.

Cheers,

H.
0
 
LVL 2

Expert Comment

by:hboys
ID: 1268192
Has this Worked for you?
0
 

Author Comment

by:justinkerns
ID: 1268193
I believe this will work.  However, I was looking at the rest of the page, to make sure that the rest of the scripting is not affected by changing the frames.

I was trying to use outerwidth, etc. to change the existing frames, but couldn't get that to work.

Thanks for the help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

929 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

10 Experts available now in Live!

Get 1:1 Help Now