setTimeout is supposed to loop, he's creating a repeater, like a running clock. But 
he's using document.write which eliminates the ability to recall the script. My last 
email shows the easiest way I know of getting that done. If you don't like using the 
DIV, you can use a textbox and just alter the style so that there's no borders... and 
it won't appear to be in a textbox. Also, if you start out with that DIV empty instead 
of containing some text, remember that your script will need to createTextNode so that 
there will be a node to alter.
 
Ferg

        -----Original Message----- 
        From: Dan Blackman [mailto:[EMAIL PROTECTED] 
        Sent: Wed 10/1/2003 9:08 AM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: RE: CF and Javascript
        
        
        Looks like SetTimeout Can only run once on a page...I took out the SetTimeOut 
and it creates an infinite loop.  Not sure the purpose of creating this loop, but 
SetTimeout running multiple times is your issue.

                -----Original Message-----
                From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ron Mast
                Sent: Wednesday, October 01, 2003 8:37 AM
                To: [EMAIL PROTECTED]
                Subject: CF and Javascript
                
                

                Hello, 
                Can someone tell me why I'm getting an object expected error when I 
run the following: 
                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 

                <html> 
                <head> 
                        <title>Testing</title>          
                        
                <script language="JavaScript"> 
                        function runMe(){ 
                                document.write("<cfoutput>#now()#</cfoutput>"); 
                                testingThis(); 
                        } 
                        function testingThis(){ 
                                setTimeout('runMe()',2000); 
                        } 
                </script>       
                        
                </head> 

                <body onload="testingThis();"> 

                </body> 
                </html> 

                --------------------------------------------------------------- 

                It runs once and then after 2 seconds I get the error. 

                Ron Mast 
                Truth Hardware 
                Webmaster 

��,�ǧu隊[h�+-u�~�(��{.n�+���zwT5%H$HKh�+-��z�]�
+�:,���&���칻�&ކ�i��0���q����

Reply via email to