473,320 Members | 1,977 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.

DOM access to <OBJECT type="text/html" data="..." /> or <iframe>

1
Hello,

I use an object element to replace the iframe element in ie, like this:

[HTML]<object
id="x_obj"
data="http://.../"
type="text/html">

<iframe name="x_if" id="x_if" src="http://.../">
</iframe>

Alternative text (if object and/or iframe are not supported)

</object>
[/HTML]
With an <iframe> to support gecko browsers.

I want to retrieve the total height of the page loaded inside the object/iframe element.

With ie, this script works:

alert(document.getElementById("x_obj").object.body .scrollHeight);


And in gecko browsers (FF), the script should look like this:

alert(document.getElementById("x_if").contentDocum ent.height);


This script written for firefox doesn't work well as it gives a result of "0".

When I delete the object element from my script and just leave the iframe element, it works well.

Could anyone help me understand this strange behaviour ?

Thank you very much.
Jun 29 '06 #1
1 6143
acoder
16,027 Expert Mod 8TB
The iframe should not appear inside object tags. Gecko browsers do support the object tag.
Apr 28 '08 #2

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

Similar topics

9
by: Arash Dejkam | last post by:
Hi All, Is it possible to write on an <OBJECT type="text/html"> using document.write() from within the html containing that tag the way we write on a popup window? I couldn't do that after a lot...
6
by: Jon Davis | last post by:
I recently learned how to do an <OBJECT> alternative to <IFRAME> in current browsers using: <object id="extendedhtml" type="text/html" data="otherpage.html" width="250" height="400"></object> ...
3
by: Jaime Stuardo | last post by:
Hi all... Both controls are server side. The former has more properties. Both may have associated events that are ran at server. Which one are recommended to use? is performance an issue? in...
13
by: chippy | last post by:
im currently doing my myspace ... ive seen bands put codes in scroll boxes ive tried this but it just showed the code how can i make it show the code not the image???
1
Fary4u
by: Fary4u | last post by:
Hi Guys i'm trying to upload a file, i've tried 3 different methods but still not work out i don't know how to over come this problem hidden file value, multiple form or popup uploading. 1-...
0
Fary4u
by: Fary4u | last post by:
Hi Guys i'm trying to upload a file, i've tried 3 different methods but still not work out i don't know how to over come this problem hidden file value, multiple form or popup uploading. 1-...
17
by: malathib | last post by:
Hi, I have used a rich text editor in my application. I got it from one of the site.all are JS files. My problem is, i want to call a javascript function from the iframe. Can anybody help...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
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
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.