473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

resizing nested iframes - help!!!

helpmepls
i have a site where I have an iframe mainFrame which loads page content from the main menu (top horizontal menu).

within this mainFrame is a second menu to left specific to the loaded page, and another iframe (ie. suppFrame) which loads content from this left menu. The reason for the second iframe is some of the pages have different left menus.

this works fine, apart from resizing of the page. I do not wish to use scroll bars. Say if I click on the Support page in the main menu, the initial page loads and resizes fine. But if I wish to click one of the left menu options to load in the suppFrame this stays the same size as the intially loaded page and does not stretch/shrink to suit the new content.

Does anyone know how to efficiently resize nested iframes? or have a better solution?

i tried creating multiple pages for the main menu with includes for header, left menu etc. but you get that horrible flash when the page reloads, the iframe seems more seamless to the user.

thanks!
Mar 13 '08 #1
1 2666
Just thought I'd share what I ended up doing for this one (in ASP.NET VB):

I now have a master page with the header built in including a logo, image and the main menu. The master page then has two contentplaceholders, one on left for the submenu and one to the right for the body page. The master also has the resize iframe code from Dynamic Drive: http://www.dynamicdrive.com/dynamici...iframessi2.htm

I have a Default.aspx based on this master. The left contentplaceholder has content as an iframe named menuFrame and the right contentplaceholder has content as an iframe named bodyFrame.

I found a cool javascript that loads content into two iframes at once. I included it in the master page. Now I only need that default.aspx page to control the site, and the htm pages to load in the iframe and it loads smoothly.

Expand|Select|Wrap|Line Numbers
  1. <script language="javascript"> 
  2. function loadTwo(iframe1URL, iframe2URL) 
  3. parent.menuFrame.location.href=iframe1URL 
  4. parent.bodyFrame.location.href=iframe2URL 
  5. </script> 
and the link to open the page will be
Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:loadTwo('[content for first iframe],'[content for second iframe]')"> link </a>
here's the site I got that from:
http://www.samisite.com/test-csb2nf/id82.htm


Hope this is useful for someone else as I searched high and low to find a solution!
Mar 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Grigore Marinescu | last post by:
Hi all, I have the following databasedesign : www.marinescu.dk/databasedesign.pdf which i have a nested SELECT on but i need some more information which i don't know how to retrieve. I have...
3
by: Tommy | last post by:
I have been working on getting nested repeaters to work for several days. When I add a repeater inside my item template i cannot see it in my code and can't set the datasource for it, etc, thus...
14
by: Tiraman | last post by:
Hi , I would like to use nested namespace . I have 3 namespace as dll's : Namespace A Namespace B Namespace C And i want to have some namespace that contain them all , some thing like
4
by: Alex D. | last post by:
Hi guys. I have two nestes IFRAMES in one of my pages. The main page has an Iframe that points to an aspx page, this page has another Iframe that points to a regular html file. My problem is when...
3
by: tzuriel | last post by:
Hello all, I think nested loops will do what I want, but I can't seem to get them right. I have two tables, members and casts. I run a query as follows: $sql_query="SELECT DISTINCT...
3
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page...
0
by: sharonrao123 | last post by:
hello all, I have a parent gridview company and in this one a nested gridview people, Is it possible to allow the user to select one row or multiple rows from the people gridview using a check box...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.