print disapear printed code

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
bonanza
Forum Newbie
Posts: 7
Joined: Mon Apr 19, 2010 9:50 am

print disapear printed code

Post 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.
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: print disapear printed code

Post 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.
Post Reply