Hi,
i have a webpage where i am loading extenal website into div.This question is similar to the thread
http://www.aspforums.net/Threads/320057/Automatically-Scroll-DIV-after-1-second-periodically-using-jQuery/
I have applied exactly the same logic of yours to scroll the content of the <object> tag which is a w3schools website, but the control is not going to java script itself.
please find below the code i have used
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.8.0.js"></script>
<link href="Styles/StyleSheet1.css" rel="stylesheet" />
<script>
$(document).ready(function () {
$("#siteloader").html('<object id="objs" height="100%" width="100%" data="http://www.w3schools.com//">')
});
</script>
<script type="text/javascript">
$(function () {
var interval = SetInterval(function () {
if ($("#objs").scrollTop() != $('#objs').scrollHeight) {
$("#objs").scrollTop($("#objs").scrollTop() + 10);
}
else {
clearInterval(interval);
}
}, 1000);
});
</script>
</head>
<body >
<div id="siteloader"></div> <%--div to load site--%>
</body>
</html>
and my css settings is
body,div {
height:100%;
width:100%;
overflow:hidden;
}
object
{
min-height:100%;
min-width:100%;
overflow-y:scroll;
}
Please help me in implementing this
Thanks