Page 1 of 1

print disapear printed code

Posted: Tue Apr 20, 2010 3:07 am
by bonanza
Hi,

I have an exploded string from database which I want each part of it to be printed on the screen one after the other the first one appeer on the screen for a period of time then disappear and the second one will appear in the same place of the first one after disappearing. If anyone can help me with that it would be greet.

Thanx in advance.

Re: print disapear printed code

Posted: Tue Apr 20, 2010 1:22 pm
by kaszu
Yes, you will have to use javascript.

To pass data from PHP to javascript you can use json_encode.
To create timer, use JS function setTimeout or setInterval.
To change content of element in JS use

Code: Select all

document.getElementById('SOME_ID').innerHTML = 'NEW CONTENT';
Try and if you still can't get it working, post a code and I will try to help.