Solved

Application.,cfc and changes in this tag

Posted on 2011-02-19
1
859 Views
Last Modified: 2012-05-11
i have defined the application.cfc in my website and used the cfscript> tag to define the settings using the this tag like

<cfscript>
       this.name = "Test";
       this.applicationTimeout = createTimeSpan(0,1,0,0);
       this.clientmanagement= "yes";
       this.loginstorage = "session" ;
       this.sessionmanagement = "yes";
       this.sessiontimeout = createTimeSpan(0,0,20,0);
       this.setClientCookies = "yes";
       this.setDomainCookies = "yes";
       this.scriptProtect = "all";
       if left(server.ColdFusion.ProductVersion,1) GT 8
       this.googlemapkey = "blah blah blah";
       end if
   </cfscript>

now apparently it is throwing error,

 Invalid CFML construct found on line 12 at column 15.
ColdFusion was looking at the following text:

left

The CFML compiler was processing:

    * A script statement beginning with if on line 12, column 12.
    * A cfscript tag beginning on line 2, column 2.

i was sure that it will throw an error but how can i do this in good way

Please guide
0
Comment
1 Comment
 
LVL 52

Accepted Solution

by:
_agx_ earned 125 total points
ID: 34934562
if left(server.ColdFusion.ProductVersion,1) GT 8
       this.googlemapkey = "blah blah blah";
end if


That's not valid cfscript.  There's no "end if" and the comparison must be enclosed in parenthesis (...)

ie
if (listFirst(server.ColdFusion.ProductVersion) GT 8) {
    this.googlemapkey = "blah blah blah";
}    

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now