Welcome visitor
* Login
* Register
It is currently September 18th, 2019, 12:32 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  How to get scrollTop of a frame ???
PostPosted: December 28th, 2009, 10:13 pm 
User avatar

Posts: 40
How could I get the scrollTop of a frame from another frame?

I forgot how to do it and now I'm stuck!


Top
 Profile  
 
  Re: How to get scrollTop of a frame ???
PostPosted: December 29th, 2009, 3:27 am 
User avatar

Posts: 112
<script>sctop = (parent.window.frames[0].document.documentElement && parent.window.frames[0].document.documentElement.scrollTop) ?
parent.window.frames[0].document.documentElement.scrollTop : parent.window.frames[0].document.body.scrollTop;
alert(sctop);</script>

The frame #0 is the first one ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron