Text Fader

Reply

Join Date: Oct 2008
Posts: 3
Reputation: sharad.kohli is an unknown quantity at this point 
Solved Threads: 0
sharad.kohli sharad.kohli is offline Offline
Newbie Poster

Text Fader

 
0
  #1
Oct 5th, 2008
Hi please help me,I am kind of new at php.

This is what i have to do please ,provide me with a code if some one can

1)I have files named like 10.txt,9.txt,7.txt etc..//only text files
2)higher the number of the file hisger the priority
3)i just want to use php to read from each file and display it on screen eg... say i am reading from 10.txt then i will display the text of 10.txt on screen say for 100 seconds....
then this fades away and i display the text of 9.tx for 90 seconds ...
and so on and after the last file is read the process repeats again.....

the code to do so from ajax and javascript is very dirty and i can not understand much
Please provide a php solution to this??
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 524
Reputation: Will Gresham is on a distinguished road 
Solved Threads: 86
Sponsor
Will Gresham's Avatar
Will Gresham Will Gresham is offline Offline
Posting Pro

Re: Text Fader

 
0
  #2
Oct 5th, 2008
This is not possible with PHP without using some other language as well, PHP is a server-side scripting language and does not control how the text is displayed, this is dealt with by the HTML/CSS/javascript.

PHP can open the files and display the contents of them, but to move to the next file without reloading the page will require AJAX or at least some form of JavaScript
Last edited by Will Gresham; Oct 5th, 2008 at 7:06 pm.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 1,602
Reputation: scru has a spectacular aura about scru has a spectacular aura about 
Solved Threads: 130
Featured Poster
scru's Avatar
scru scru is offline Offline
Posting Virtuoso

Re: Text Fader

 
0
  #3
Oct 5th, 2008
Yeah, you will need something like javascript for this. Ajax techniques are probably best suited for this.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3
Reputation: sharad.kohli is an unknown quantity at this point 
Solved Threads: 0
sharad.kohli sharad.kohli is offline Offline
Newbie Poster

Re: Text Fader

 
0
  #4
Oct 5th, 2008
thanks for the reply!!

any idea from where should i begin!!!!!
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 524
Reputation: Will Gresham is on a distinguished road 
Solved Threads: 86
Sponsor
Will Gresham's Avatar
Will Gresham Will Gresham is offline Offline
Posting Pro

Re: Text Fader

 
0
  #5
Oct 5th, 2008
To get a list of files in a directory, look into the opendir() readdir() and closedir() functions in PHP, to get the contents of the files, look at the fopen() fread() and fclose()
This is the starting point, for assistance in Javascript there is a specific forum on here for that.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 849
Reputation: R0bb0b is on a distinguished road 
Solved Threads: 67
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Practically a Posting Shark

Re: Text Fader

 
0
  #6
Oct 5th, 2008
Originally Posted by sharad.kohli View Post
thanks for the reply!!

any idea from where should i begin!!!!!
Search for one(there are several free source projects available) tear it apart and see how it works. That's the best way.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss

-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3
Reputation: sharad.kohli is an unknown quantity at this point 
Solved Threads: 0
sharad.kohli sharad.kohli is offline Offline
Newbie Poster

Re: Text Fader

 
0
  #7
Oct 6th, 2008
thanks man....
i was tryinhg to make the same thing using php by the function s you just described and some html...guess i will try to use javascript or ajax
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC