473,320 Members | 2,054 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,320 software developers and data experts.

problems with iframe rendering

Hi,

I have googled on this but can't find the answer. I am writting a page
that will be viewed with Firefox .9 or >, and mainly with IE 6, where I
need to update pieces of the page without updating the whole page. I was
going to do it with <OBJECT ...> but realized that the support in IE6 is
terrible, so decided to do it with <IFRAME...>.

My problem is that there is a huge blank space left inside the iframe
body, under its content, that I can't seem to get rid of. Look at this:

a.html:
<html>
<head></head>

<body>
<table border=1>
<TR><TD>first col<TD>second col><TD>third col>
</table>
</body></html>

main.html:
<html>
<head></head>

<body>
<p>blahblahblah</p>

<div>
<iframe src=a.html type="text/html"></iframe>
</div>

<div>
<iframe src=a.html type="text/html"></iframe>
</div>

<div>
<iframe src=a.html type="text/html"></iframe>
</div>

</body></html>
I've played with vspace, framemargin, margin, padding, etc, etc, etc and
tried all of those attributes on the iframe tag, the div tag and on the
body tag of a.html, but I always get this huge space under the table row.
I want the table rows to be glued to each other. I can't use height=
because a.html will be of different sizes that I cannot predict, and I
don't want scroll bars....

I know that the problem is that the body of a.html is too big (this is
easy to show by putting different colours with bgcolor in the body
and the table tag), but I don't know how to fix.

Any idea ? Thanks !
Yves.
----
http://www.cuug.ab.ca/dorfsmay
http://www.SollerS.ca

Jul 23 '05 #1
1 5742
no spam wrote:
I have googled on this but can't find the answer. I am writting a page that will be viewed with Firefox .9 or >, and mainly with IE 6, where I need to update pieces of the page without updating the whole page. I was going to do it with <OBJECT ...> but realized that the support in IE6 is terrible, so decided to do it with <IFRAME...>.

My problem is that there is a huge blank space left inside the iframe body, under its content, that I can't seem to get rid of. Look at this:
...
Any idea ? Thanks !


I'd suggest you look into using the XML HTTP Request object and
Javascript to dynamically update the pieces in question.
http://jibbering.com/2002/4/httprequest.html is a good place to start
reviewing how to do this.

If you're dead set on using <iframes>, you could:

1) Assign each <iframe> an "id" attribute.

2) In the iframed document, compute the height and set the iframe's
height in the parent document.
(parent.document.getElementById("iframe_id").style .height =
this.document.body.offsetHeight). onload() would be a good place to
place your code,

3) Make sure the iframes have 0 margin, no border, and scrolling off.

This would probably break if the user resized fonts, which is why I'd
go with XML HTTP request.

Good luck!

--
niall

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Javier | last post by:
Hello, I'm very new in this forum and as I have the following problem, the website is in http://new.vanara.com ----------------------------------------------------------------------------...
28
by: Christopher Benson-Manica | last post by:
I have the following document, at http://ataru.gomen.org/file/test.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head>...
1
by: John Cosmas | last post by:
I had a page using iFrame and was able to control the contents of the document inside of the iFrame. I took the same document, converted it into a ASPX, and changed the iFrame to a Panel. I took...
2
by: J-T | last post by:
Hello, I have an iframe which its scr is set to show a url (am image) .I am put this iframe on a user control and I am loading that user control dynamically to my Default.aspx.Now I need to...
20
by: Alan Silver | last post by:
Hello, I have read about the problems that IE has when using a doctype of HTML 4.01 Transitional. I was advised to use Strict wherever possible. My question is, does the same apply to XHTML...
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...
3
by: Prasad | last post by:
Hi , I am using a cross domain iframe in my page.. If i want to change the iframe height a/c to its content height , its giving Permission denied error as i am trying to access a function, which ...
4
by: R144N | last post by:
Hi Everyone, I've searched variuos forums as much as I could for a similar problem within the time I could and found no helpful solution, I hope someone here can help me out: I have an iFrame...
4
by: raymon | last post by:
Hi, I have a page with two iframes that load content from another website. Only one of the iframes is shown at a time, depending on which tab the user is viewing. If user clicks on tab A, he will...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.