Yea, I was getting ready to say much the same thing... If you resort to standard DOM (which isn't all well supported by various browsers) you can write the content into a section of the page denoted by the ID attribute of an html tag... There are a number of CF Functions designed to work with DOM in the onTap framework's function libraries. cf_dom...
http://www.turnkey.to/ontap/docs/index.cfm?netaction=libraries/cf_dom These were also included in the Tapestry API (TAPI) http://www.turnkey.to/tapi although it's languished a bit in favor of the onTap framework -- there haven't been any recent changes to the cf_dom library, but changes to the cf_core library haven't gotten back to TAPI yet. And probably won't unless there's a sudden spike in demand for TAPI in comparison to onTap, which I don't really see happening soon, even though the differences (and the reasons why they're separate) are mentioned on the onTap framework home page. s. isaac dealey 972-490-6624 team macromedia volunteer http://www.macromedia.com/go/team chief architect, tapestry cms http://products.turnkey.to onTap is open source http://www.turnkey.to/ontap > Heheh > This is a clever little problem. > Here is what is happening. > Page loads, calls testingThis() > In 2 seconds, it calls runMe() > It uses the document.write() function > This clears all data on the page, including the script you > are trying to > run. > Object not found. You need to do something other than > write to the page > that is running the script. Usually if you want to use > document.open() or > document.write() you write to a different frame. > top.frameName.document.write() . . etc. > -You can have multiple setTimeout() statements on a page, > even if it creates > an infinite loop, as long as there is enough time between > iterations for > other processes to run - it won't lock up the browser. > This is how those > little javascript timers and clocks are created! =) > ex: > var countdown = 5; > function liftoffCountdown(){ > if(countdown <= 0){ > alert(countdown); > countdown--; > setTimeout('liftoffCountdown()',10 > 00); > }else{ > alert('liftoff!') > } > } > liftoffCountdown(); > this would alert '5' '4' '3' '2' '1' 'liftoff!'. You > could change the > countdown to 500000 and it wouldn't lock the browser (just > make sure you can > close the browser in that 1 second gap between alerts! > Lol. (just an > example people) > Best Regards, > Nate Nielsen > [EMAIL PROTECTED] > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Dan Blackman > Sent: Wednesday, October 01, 2003 9:08 AM > To: [EMAIL PROTECTED] > 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()#</cfoutpu > t>"); > 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 ----------------------------------------------- To post, send email to [EMAIL PROTECTED] To unsubscribe: Send UNSUBSCRIBE to [EMAIL PROTECTED] To subscribe / unsubscribe: http://www.dfwcfug.org
