Thanks!!!!
Works perfect. Dustin On 8/27/02 8:46 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> spit this out onto my computer screen: > > put this in a page of it's own, call it testbandwidth2.cfm. don't need > anything else but the code: > > <cfparam name="url.action" default="start"> >>> <cfif thisTag.ExecutionMode is "end"> >>> <cfif url.action is "start"> >>> <cfoutput> >>> <body onload="javascript: >>> location='#cgi.script_name#?action=show&size >> =#len(thisTag.GeneratedContent) >> # >>> &starttime=#urlencodedformat(now())#';"> >>> </cfoutput> >>> </cfif> >>> </cfif> > > > now create your testbandwidth1.cfm page, with the other code shown below. > > generally, to call a custom tag, just say <CF_filename>, that's it! > > so if you have a page called getToday.cfm, with code: > > <cfoutput>Today's date is #Now()#</cfoutput> > > then to call it in your other page, you could just say something like: > > <b><cf_getToday></b> > > > Duncan Cumming > IT Manager > > http://www.alienationdesign.co.uk > mailto:[EMAIL PROTECTED] > Tel: 0141 575 9700 > Fax: 0141 575 9600 > > Creative solutions in a technical world > > ---------------------------------------------------------------------- > Get your domain names online from: > http://www.alienationdomains.co.uk > Reseller options available! > ---------------------------------------------------------------------- > ---------------------------------------------------------------------- > > > > dnk > <lists@mailro To: CF Mailing List > <[EMAIL PROTECTED]> > ot.com> cc: > Subject: Re: [ cf-dev ] Detecting > connection speed > 08/27/02 > 04:39 PM > Please > respond to > dev > > > > > > How does one implement a custom tag? Still searching the kb though. I > wanted > to throw this on my server as I am JUST starting to learn CF. > > Thanks! > > Dustin > > > >> At 14:57 28/03/2001 +0100, you wrote: >>> This is how I'd do this (just double check my maths)... >>> >>> file: testbandwidth1.cfm >>> <cf_testbandwidth2> >>> <cfif url.action is "start"> >>> <!--- make a whole lot of page content to download ---> >>> Your bandwidth is being tested, please wait...<br> >>> <cfloop index="cnt" from="1" to="100000"> >>> <!-- the quick brown fox jumps over the lazy dog >> --> >>> </cfloop> >>> Bandwidth test nearly completed... >>> <cfelse> >>> <!--- calculate Kbps ---> >>> <cfoutput> >>> <cfset elapsedTimeSecs = (now() - url.starttime) >> * >>> 24 * 60 * 60> >>> <cfset kbps = ((url.size * 8) / 1024) / >>> elapsedTimeSecs> >>> Bandwidth test complete:<br> >>> Elapsed time in seconds: #elapsedTimeSecs#<br> >>> #kbps# Kbps >>> </cfoutput> >>> </cfif> >>> </cf_testbandwidth2> >>> >>> file: testbandwidth2.cfm >>> <cfparam name="url.action" default="start"> >>> <cfif thisTag.ExecutionMode is "end"> >>> <cfif url.action is "start"> >>> <cfoutput> >>> <body onload="javascript: >>> location='#cgi.script_name#?action=show&size >> =#len(thisTag.GeneratedContent) >> # >>> &starttime=#urlencodedformat(now())#';"> >>> </cfoutput> >>> </cfif> >>> </cfif> >>> >>> (yes, I am bored) > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] > > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
