Hello All
So I am trying to get and Iframe of google calendar to auto scroll for for a set amount of time. Before it refreshes and starts over.
http://hvl-gruppen.dk/mediasignage/herfoelge/gcal.html is what im trying to scroll but cant seem to get it to work.
http://www.dynamicdrive.com/forums/showthread.php?40339-IFRAME-Autoscrollhttp://www.dynamicdrive.com/dynamicindex2/external.htm/***********************************************
* IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
//specify path to your external page:
var iframesrc="external.htm"
document.write('<iframe id="datamain" src= "'+iframesrc+'" width="1200px" height="400px"
marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1"
scrolling="no"></iframe>')
var scrollspeed=cache=2
var initialdelay=500
function initializeScroller(){
dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
dataobj.style.top="5px"
setTimeout("getdataheight()", initialdelay)
}
function getdataheight(){
thelength=dataobj.offsetHeight
if (thelength==0)
setTimeout("getdataheight()",10)
else
scrollDiv()
}
function scrollDiv(){
dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed+"px"
if (parseInt(dataobj.style.top)<thelength*(-1))
dataobj.style.top="5px"
setTimeout("scrollDiv()",40)
}
if (window.addEventListener)
window.addEventListener("load", initialiazeScroller, false)
else if (window.attachEvent)
window.attachEvent("onload, initializerScroller)
else
window.onload=initializeScroller
Have been reading thru these. And feel there is an answer somewhere in there. But cant get it to work.
Anyone inhere that understand it better than I do, and can give me an idea of how to set it up so it works ?
regards Hvl