JAVA
Publicado por David (1 intervención) el 14/11/2007 10:33:46
Hola a todos,
Estoy haciendo un sistema de noticias para wordpress
a través de un scroll, en el cual, las personas que estén dados de alta puedan enviar mensajes (o noticias) y apareceran en unos plasmas. Los mensajes aparecen a traves de un scroll. Pero tengo un problema. Los Scrolls que he visto que se pueden implantar funcionan durante un periodo de tiempo. Es decir, que recarga las noticias de la pagina durante un x tiempo.Esto se puede modificar a mi antojo
Lo que quiero es que se recargue la pagina en el momento que termina de aparecer el ultimo mensaje para que asi vuelva aparecer el primero.
Gracias por todo y un saludo.
Este es el codigo que tengo actualmente:
/***********************************************
* 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 speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=2
//Specify intial delay before scroller starts scrolling (in miliseconds):
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", initializeScroller, false)
else if (window.attachEvent)
window.attachEvent("onload", initializeScroller)
else
window.onload=initializeScroller
</script>
</body>
</html>
Estoy haciendo un sistema de noticias para wordpress
a través de un scroll, en el cual, las personas que estén dados de alta puedan enviar mensajes (o noticias) y apareceran en unos plasmas. Los mensajes aparecen a traves de un scroll. Pero tengo un problema. Los Scrolls que he visto que se pueden implantar funcionan durante un periodo de tiempo. Es decir, que recarga las noticias de la pagina durante un x tiempo.Esto se puede modificar a mi antojo
Lo que quiero es que se recargue la pagina en el momento que termina de aparecer el ultimo mensaje para que asi vuelva aparecer el primero.
Gracias por todo y un saludo.
Este es el codigo que tengo actualmente:
/***********************************************
* 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 speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=2
//Specify intial delay before scroller starts scrolling (in miliseconds):
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", initializeScroller, false)
else if (window.attachEvent)
window.attachEvent("onload", initializeScroller)
else
window.onload=initializeScroller
</script>
</body>
</html>
Valora esta pregunta


0