Hey everyone,

 

I need to dynamically write a javascript file from Cold fusion. However, it
keeps giving me errors. Is there a way to write a file using cf tags in the
output?

 

Example:

<cffile action = "write" 

    file = "{filepath}" 

    output = "       var map = null;

<CFLOOP from="1" to="#toloop#" index="Loop">

var lat[loop] = {latitude};

var lon[loop] = {longitude}; 

var latLong[loop] = new VELatLong(lat[loop], lon[loop]);','var points[loop]
= [

            new VELatLong(lat[loop], lon[loop] - 0.15),

            new VELatLong(lat[loop] + 0.1, lon[loop] - 0.05),

            new VELatLong(lat[loop] + 0.1, lon[loop] + 0.05),

            new VELatLong(lat[loop], lon1 + 0.15),

            new VELatLong(lat[loop] - 0.1, lon[loop] + 0.05),

            new VELatLong(lat[loop] - 0.1, lon[loop] - 0.05)];','shape[loop]
= new VEShape(VEShapeType.Polygon, points[loop]);

</CFLOOP>

">

 

I need to loop in the file to put all the points and latitude / longitude
for a map. So, I need to parse the cfloop code in the file, but only write
the results to the file. Please let me know if this can be done?

 

Rick Sanders

Webenergy

Canada: 902-431-7279

USA:       919-799-9076

Canada: www.webenergy.ca

USA:       www.webenergyusa.com

 






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308083
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to