473,466 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

scrollTop in an <IFRAME> not working

Hello everybody!

I encountered a strange behavior when trying to read the scrollTop
propery of the <body> element from inside an iFrame:

<body onmousemove = "window.status = document.body.scrollTop;">

allways reports "0" , even if i scroll down in the iframe.

Is this a known bug?

Thanx, Axel
Jul 23 '05 #1
2 9018


Axel Schick wrote:

I encountered a strange behavior when trying to read the scrollTop
propery of the <body> element from inside an iFrame:

<body onmousemove = "window.status = document.body.scrollTop;">

allways reports "0" , even if i scroll down in the iframe.

Is this a known bug?


Whether body.scrollTop says anything about the scroll position depends
on the browser and with IE 6/Win even on the rendering mode so at least
tell us what browser you are trying with and give a URL perhaps.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
Martin Honnen <ma*******@yahoo.de> wrote in message news:<41***********************@newsread4.arcor-online.net>...
Axel Schick wrote:

I encountered a strange behavior when trying to read the scrollTop
propery of the <body> element from inside an iFrame:

<body onmousemove = "window.status = document.body.scrollTop;">

allways reports "0" , even if i scroll down in the iframe.

Is this a known bug?

Whether body.scrollTop says anything about the scroll position depends
on the browser and with IE 6/Win even on the rendering mode so at least
tell us what browser you are trying with and give a URL perhaps.

Yes, that's true,sorry. We use IE6 for our ERP-System. I've set up a
Testpage in which i stripped the code to the bone, so i could
reproduce the behavior and guess what? It works... so i searched a bit
more and found that the page, where i want to implement the feature,
uses a HTC behaviour which alternates the properties of the body tag..
Sorry I could not give you an URL, because the Page runs in our
Intranet, but if i figure anything out, that causes the problem i will
post it...

Cheers, Axel
Jul 23 '05 #3

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

Similar topics

1
by: O.J. Tibi | last post by:
hi guys, i was wondering if you could help me with a small problem. i need to have an <iframe> to behave like a <div>, in such a manner that: 1) the <iframe> should have its own display space,...
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
9
by: Julia Briggs | last post by:
How do I construct a <iframe> or equivalent for FireFox/NS browsers, inside a screen centered <div> tag? Can it be done?
2
by: chaitatp | last post by:
Hi guys, I have posted a similar question before but this post has some different. The similar link is: ...
1
by: tilt | last post by:
Hello, I use an object element to replace the iframe element in ie, like this: <object id="x_obj" data="http://.../" type="text/html"> <iframe name="x_if" id="x_if"...
0
by: diver | last post by:
I was using an <iframe> to load a website within my .aspx page. When the user "logged out", I called a javascript break out function to breakout of the frame and load the appropriate page when...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
1
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.