473,698 Members | 2,313 Online
Bytes | Software Development & Data Engineering Community
+ 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.sta tus = document.body.s crollTop;">

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

Is this a known bug?

Thanx, Axel
Jul 23 '05 #1
2 9056


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.sta tus = document.body.s crollTop;">

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*******@yaho o.de> wrote in message news:<41******* *************** *@newsread4.arc or-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.sta tus = document.body.s crollTop;">

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
3759
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, indicated by the "display: block;" style. 2) the <iframe> should resize automatically to display its contents. 3) the <iframe> should not have any border, or a small thin border if necessary.
44
919
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 put either tag inside an HTML <TD> and have the same kind of scrolling effect. This would allow me to fill the screen and have the size of the scrolling box change on resize. Thanks in advance.
9
3140
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
2042
by: chaitatp | last post by:
Hi guys, I have posted a similar question before but this post has some different. The similar link is: http://groups-beta.google.com/group/comp.lang.javascript/browse_thread/thread/a4e7317eee02579f/13714e97d19ff2a7#13714e97d19ff2a7 When I put <embed> in an <iframe> using javascript, I can't see the embedded object in Firefox. But if I put other tags say, <b>hello</b> or <img src="..."/>, it works well. I am wondering if it is...
1
6174
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" src="http://.../">
0
1997
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 logging out. This worked perfectly on my end, but the website being loaded in the iframe was not functioning properly because it was being loaded within a frame. I then tried using the <object> to load the website within my .aspx page, and the website...
0
8676
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8608
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9029
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.