|
-
Apr 13th, 2004, 08:17 PM
#1
Thread Starter
Fanatic Member
Typewriter effect
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?
-
Apr 14th, 2004, 08:54 AM
#2
Frenzied Member
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!
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Apr 16th, 2004, 07:01 AM
#3
You can use some HTML in there too if you want:
Code:
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>
Phreak
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Apr 16th, 2004, 09:08 AM
#4
Frenzied Member
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.
Have I helped you? Please Rate my posts. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|