I want to display my recordset in a typewriter effect. Types out the first record and then the second record underneath.. anyone know how to do this?
Printable View
I want to display my recordset in a typewriter effect. Types out the first record and then the second record underneath.. anyone know how to do this?
Well, load the entire thing into a JS array, and use a JavaScript timer to control when to display when you want something 'typed'. - I made an image shifter example for someone else further down this forum, try doing a search for it... Should hold all the examples you need(with and without a DB).
Cheers!
You can use some HTML in there too if you want:
PhreakCode:var count = 0
function initialize(){
mytext=typing.innerText
var myheight=typing.offsetHeight
typing.innerText=''
document.all.typing.style.height=myheight
document.all.typing.style.visibility="visible"
typeit()
}
function typeit(){
typing.insertAdjacentText("beforeEnd",mytext.charAt(count))
if (count<mytext.length-1){
it++
setTimeout("typeit()",70)
}
else
return
}
if (document.all)
document.body.onload=initialize
<!-- HTML -->
<span id="typing" style="visibility:hidden" align="left">This is the stuff here you want to have type...</span>
change:
document.all.typing.style.height=myheight
document.all.typing.style.visibility="visible"
to:
document.getElementById('typing').style.height=myheight
document.getElementById('typing').style.visibility="visible"
to make it work in more browsers.