troubleshooting Question

IFrame scrolling

Avatar of noulouk
noulouk asked on
2 Comments1 Solution1028 ViewsLast Modified:
Hi Experts,

Here is my code:

<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Untitled Document</title>
<script type="text/javascript">
var timer_id;
function scroll_iframe(frm,inc,dir) {
  if (timer_id) clearTimeout(timer_id);
  if (window.frames[frm]) {
    if (dir == "v") window.frames[frm].scrollBy(0, inc);
    else window.frames[frm].scrollBy(inc, 0);
    timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20);

function stopScroll() { if (timer_id) clearTimeout(timer_id); }

some randon content
  <iframe src="file:///C:/test/sampleframecontent.htm" name="IFrame"></iframe>
some more content
<button type="button" onclick="scroll_iframe('IFrame',1,'v');">scroll frame</button>

This works fine,  but I need to know when the scrollbar reaches the end of the document to automatically popup a message for example (this is the end).

Hope you see what I need.

Thanks in advance for your help.
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros