?
Solved

Application.,cfc and changes in this tag

Posted on 2011-02-19
1
Medium Priority
?
874 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

762 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