<html>
<head>

  <!-- php string $text and function listenlight() defined -->
  
  <!-- javascript variables letter and textstringlength and function textengine() defined -->

</head>
<body>

  <?php  
  
    listenlight($text);
    
   ?>

  <script type="text/javascript">
    
    /* CDATA tag not required here; no html entities present  */
  
    setTimeout("setInterval('textengine();', 90);", 2500);
    
    /**
      *
      *  effectively, the above function call waits 2.5 seconds before calling setInterval()
      *  which calls textengine() on each 90 millisecond interval
      **/
      
   </script>  

</body>
</html>
2
Contributors
1
Reply
5
Views
10 Years
Discussion Span
Last Post by KazmiLahore
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.