homeservicesportfoliocontactwebsite design tutorials
 

 

 
 

To the index

Custom tags

  • How can I view the contents of a variable?
  • What's the difference between a CF_ and a CFX custom tag?
  • Where can I find custom tags that other people have made?
  • How can I dynamically create a .pdf file?
  • How do I find the distance between two US zip codes?
  • Beginner

    How can I view the contents of a variable?

    If you are using ColdFusion 5 Server or later, use

    <cfdump var="#YourVariable#">

    For earlier versions, get a custom tag that will display any structure, array or query such as CF_Show or CF_ObjectDump.

    to question

    What's the difference between a CF_ and a CFX custom tag?

    Custom tags that start CF_ are ColdFusion templates. If you open one up, you will see CFML, just as in any other ColdFusion template.

    Custom tags that start CFX are compiled .dlls, written in a programming language such as C++. To use a CFX custom tag, you have to place the .dll file in the CFUSION\CFX\ directory and then use the ColdFusion Administrator to register them (tell ColdFusion what it's name is and point to it on the hard drive).

    to question

    Where can I find custom tags that other people have made?

    At the Macromedia Developer Exchange.

    to question

    Advanced

    How can I dynamically create a .pdf file?

    http://www.pdfzone.com/
    http://www.planetpdf.com/
    http://www.activepdf.com/ PDF Server Toolkit
    http://www.digapp.com/ AppendPDF
    http://www.pdflib.com/ The latest incarnation/beta of this lib supports FLAT pdf merging

    to question

    How do I find the distance between two US zip codes?

    There are more accurate formulas (look up Haversine's formula and see links below), but this works

    <cfset distance = Evaluate(((pi() * 3969.96) / 180) * (ACos((Sin(lat_A) * Sin(lat_B)) + (Cos(lat_A) * Cos(lat_B) * Cos(lon_A - lon_B)))))>

    See also CF_ZipRad
    http://www.indo.com/distance/distance-details.html
    http://www.svpal.org/~walters/GC_Measurements.htm

    to question