Solved

Application.,cfc and changes in this tag

Posted on 2011-02-19
1
857 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

14 Experts available now in Live!

Get 1:1 Help Now