Solved

Firefox iframe 100% - solution

Posted on 2006-06-10
8
1,020 Views
Last Modified: 2012-06-22
I have a solution to a problem that has been closed in a previous post but i am not sure how i can contribute this to the experts community otherwise...


iframe in firefox does not size to 100%
http://www.experts-exchange.com/Web/Q_21300606.html


function calcHeight(name)
{
  //find the height of the internal page
  document.getElementById(name).height = 0;
     
  var the_height=
    document.getElementById(name).contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById(name).height=
      the_height;
}


<iframe id="main" name="main" onLoad="calcHeight('main');" src="yourcontent.htm" height="100" width="100%" style="border:0px" FRAMEBORDER="0" scrolling="no"></iframe>


-----


it seems to not work though if you use the following in the pages:



<style type="text/css">
<!--
html, body {
height: 100%;
margin: 0;
padding: 0;
}
-->
</style>
0
Comment
Question by:kenitech
8 Comments
 
LVL 57

Expert Comment

by:giltjr
ID: 16879682
Have you tried adding marginwidth=1 marginheight=1 on the iframe definition?  I know you have defined that you have no borders, but you never know.  I also assume you meant to type height="100%" and not just "100".
0
 

Author Comment

by:kenitech
ID: 16879784
hey, this solution works for me...i'm just sure how to 'announce' it as a solution to others. is that something that people do on experts??
0
 
LVL 1

Expert Comment

by:Robert_
ID: 16881754
There's an "Accept" button in the upper right corner of giltjr's post. Click that to accept his answer as a solution.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 57

Expert Comment

by:giltjr
ID: 16881916
Ah, I think I understand.  You are not asking "How to ..."  You found a solution and want to let everybody else know.

Looking at your prior question it seems that you found what the solution was to your own question.  You posted your finding in that question.  That is all you need to do.  If somebody else is having the same problem, when they do a search they should find your prior question with the appropriate answer (that you found on your own).
0
 
LVL 30

Expert Comment

by:mtz1of4
ID: 16888547
kenitech,
Thank you for helping the community.  That's what we are truly here for. But you do not need to use up your points to help others.

As giltjr said, you have posted your findings in the other post.  Follow the instructions here to request a refund.

http://www.experts-exchange.com/help.jsp#hi70
0
 
LVL 30

Expert Comment

by:mtz1of4
ID: 17200312
I believe the original poster was actually giving the community a solution, not requesting help.

Do not Accept.  Refund Points.
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 17231669
PAQed with points refunded (20)

CetusMOD
Community Support Moderator
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

Suggested Solutions

Title # Comments Views Activity
Select2 jquery help 9 74
Does it make sense migrate a website to MIcrosoft Azure 4 48
Menu Inconsistent 3 34
Editing login page in zencart. 2 33
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

862 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

23 Experts available now in Live!

Get 1:1 Help Now