We help IT Professionals succeed at work.

ColdFusion Language

10K

Solutions

3K

Contributors

ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

I need help coming up with the logic.

I have 2 classess that been purchased on the payment plan. (the payment plan options are: 4,6 ,9 payments plan).

Let say that course 1 was purchased on 4 payment plan option. The course is consists of 1 theoretical part and 7 practical .

When payment 1 is made no practical parts are released,
when payment 2 is posted 2 practical parts get open up
when payment 3 is posted 2 more practical parts open up
when payment 4 is posted 3 more  practical parts open up

Let say that course 2 was purchased on 4 payment plan option. The course is consists of 1 theoretical part and 3 practical .

When payment 1 is made no practical parts are released,
when payment 2 is posted 1 practical parts get open up
when payment 3 is posted 1 more practical parts open up
when payment 4 is posted 1 more  practical parts open up

Let say that course 3 was purchased on 6 payment plan option. The course is consists of 1 theoretical part and 7 practical .

When payment 1 is made no practical parts are released,
when payment 2 is posted 1 practical parts get open up
when payment 3 is posted 1 more practical parts open up
when payment 4 is posted 1 more  practical parts open up
when payment 5 is posted 2 more  practical parts open up
when payment 6  is posted 2 more  practical parts open up


and so on
0
I am trying to send text message througth Coldfusion to a people phones and I am suing cfmail tag,. The text is going fine. The question is Is there a way to send a text message as a notification so it stays on the phone as a notofication . Without person needed to go to their messages and check for incoming messages
0
I am trying to integrate my coldfusion pages into  a 'responsive'  navigational bar (eg bootstrap template from W3schools). Below is the result of my efforts in trying to use one of these templates.   The  page code I created is below and also a link to the server so you can see the result.

The result suggests that the template I am using does not fully support coldfusion OR I am not using the correct approach in building in the coldfusion pointers to the nav template.

I am asking the following questions

-  Am I doing something stupid in the example I have included - if so, can you give me a pointer as to what the solution is
-  What are your recommendations for building a responsive Nav bar which will support coldfusion.


Many thanks,

james





<title>Untitled Document</title>
<meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
</head>

<body>
<div class="container background">
  <div class="row">

    <h1>ABAC INSCRIPTION 2019</h1>
<nav class="navbar navbar-inverse">
    <div class="container-fluid ">
      <ul class="nav navbar-nav">
        
        <li><a href="#tab2" data-toggle="tab">Programme 

Open in new window

0
I have a bootstrap login popup. Upon login into the system throught the bootstrap popup I need to redirtect the client to either myAccount page or myCart page.

		$('#login-form').bootstrapValidator({
			message: 'This value is required',
			submitButton: '$login-form button[type="submit"]',
			live: 'enabled',
			
        	
        	 feedbackIcons: {
	            valid: 'glyphicon glyphicon-ok',
	            invalid: 'glyphicon glyphicon-remove',
	            validating: 'glyphicon glyphicon-refresh'
	        },
	        
	        fields: {

            username: {
            	group: 'col-sm-2',
                message: 'The username is not valid',
                validators: {
                    notEmpty: {
                        message: 'The username is required and can\'t be empty'
                    },
                    stringLength: {
                        min: 2,
                        max: 30,
                        message: 'The username must be more than 2 and less than 30 characters long'
                    }
                   
                }
            },

            loginPassword: {
            	group: 'col-sm-2',
                validators: {
                    notEmpty: {
                        message: 'The password is required and can\'t be empty'
                    }
                   
                }
            }
            }
        }).on('success.form.bv', function(e) {
     // alert(100)
        // Prevent form 

Open in new window

0
Hi

Using ColdFusion, what is the easiest way to find links like the one below in a web page, and removing the tag so its no longer a link.

The link text, in this case "top executives" needs to stay.  Just don't want it to be a clickable link.

The key here is that all these links will have both the "XYZ" folder and the ".htm" extension, which makes them unique on the page.

I am slightly familiar with regex, but not good enough to do this on my own.

<a href="/XYZ/management/top-executives.htm"><u>top executives</u></a>

Thx

Michael
0
Looking for the easier way to identify  users of  a specific COLD FUSION  website on IIS server
0
Just taking a survey of other developers for best practices in maintaining your search filters and order-by while paging through multiple pages of search results.

Typical scenario.. user enters a few search filters and presses search.   Say, 500 results and showing 25 records per page.  The user changes the display order and clicks through to page 2, page 3, etc.  

What approach are people using to maintain the where-clause (search filters) and the order by so that each page, the same results are shown, but a different page.

Store SQL where clause in session variable?
Save filter criteria to the database?
Save search results to a temporary table and page through them?
Put search fields and order-by fields inside the search form and resubmit them each time?

Pros and cons for all approaches.
Just curious to change/improve my method.
0
My form has checkboxes with user roles, and a select box with users. I need a select box to repopulate based on the checkbox value(s) when clicked. The checkboxes allow selection of either "all" (in which case the select options need not change) OR any combination of "cm", "adv", "cd" values. Once the checkbox(es) get clicked, the select box should repopulate dynamically (all this before form gets submitted).

<cfquery datasource="datasourceName" name="qry_staff">
    SELECT userID, lastname + ', ' + firstname AS staffName
    FROM   userTable
    WHERE  role IN('cm','adv','cd')
    </cfquery>

<form>
<input type="checkbox" name="assignedRole" id="checkedAll" value="all">All<BR>
<input type="checkbox" name="assignedRole" id="assignedRole" value="cm" class="checkSingle">Case managers<BR>
<input type="checkbox" name="assignedRole" id="assignedRole" value="adv" class="checkSingle">Advisors<BR>
<input type="checkbox" name="assignedRole" id="assignedRole" value="cd" class="checkSingle">Career developers

<select name="staff>
<cfloop query="qry_staff" multiple="multiple">
<cfoutput>
<option value="#qry_staff.userID#">#qry_staff.staffName#</option>
</cfoutput>
</cfloop>
</select>
<input type="submit">
</form>

The entire page must not reload every time a user changes text box selection(s). I haven't yet been able to find a suitable solution. I'm jquery knowledgeable, but not so much Ajax. What I've been able to find makes me think Ajax would really be the way…
0
I have a report that works with a regex and validates well enough w/ the regex. The client is asking to force the date field to be all caps though. I can add the style -  style="text-transform:uppercase" - to force this but when I do it throws an error. Anyone have any idea why this would happen? code below:
<cfinput type="text" 
                                          name="period" 
                                          validate="regex"
                                          pattern="^(JAN|FEB|MAR|APR|JUN|JUL|AUG|SEP|OCT|NOV|DEC)-(19|20)[0-9]{2}$" 
                                          message="Please enter the Accounting Period in the correct format, i.e. MON-YYYY." 
                                          required="true"
                                          id="period"
                                          class="Headline12DrkBlu" 
                                          size="10" 
                                          maxlength="8"
                                          default="#period#">

 But if you add the style to force the all caps it errors out: 

            <cfinput type="text" 
                                          style="text-transform:uppercase"
                                          name="period" 
                                          validate="regex"
                                          pattern="^(JAN|FEB|MAR|APR|JUN|JUL|AUG|SEP|OCT|NOV|DEC)-(19|20)[0-9]{2}$" 
                                          

Open in new window

0
can you run cold fusion in a docker contianer , I dont know if you can even do this , have you done this or have and example that you know works ?

thanks
0
I have two mysql databases on the same mysql server - with identical structures - differing only  in data content.  They each have customer information -  one for year 2016 and the other for year 2017. Objective is to
- list the customers who were active in 2016, but are inactive in 2017...... Lost Customers
- list the customers who are active in 2017 but inactive  in 2016........  New Customers

There are no database  technical problems - permissions etc..   I need help with

     How to manipulate two record sets (2016 and 2017) to create tables of lost and new customers. I am trying a 'lists' approach as you will see from the code attached - idea being to create and  manipulate  lists  from each recordset. I able to create the lists, but not to subtract  them. Printout attached shows lists for 2016 and 2017)

    If the LISTS approach is not the best,  I would ask for advice on alternative

    Many thanks for your help

    James Kane
    =======================================================================================

    PRINTOUT OF  TWO LISTS PLUS  TABLE
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <cfparam name="nom" default="0">
    <cfparam name="ListCommon" default="0">
    <head>
    
    
    <!---record sets for year 18 and 17--->
    <cfquery name="activemembers_18" datasource="office_18">
    SELECT civilites, nom, 
    

    Open in new window

    0
    I need to add a try/catch to stop a database connection when nothing is found for a Cold Fusion report query. I'm trying to determine the best place to place the try/catch to ensure this. Researching has led to using COM.Allaire.ColdFusion.Request.Timeout  as the exception to look for but I'm not sure where to place that and exactly how to format it.

    Also the code below has thrown an error at times stating: The value " cannot be converted to a number referencing this line of code:

    <cfset countttl = #invcounts.15Count# + #invcounts.1530C# + #invcounts.30plusC#>

    Thanks for any help. See code below:

    <cfset #date# = #DateFormat("#Now()#","mmmm dd, yyyy")#>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML LANG="EN-US">
    <head>
    <title>Payments</title>
    
    <link href="../css/home.css" rel="stylesheet" type="text/css" />
    
    </head>
    
    <table width="94%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="../images/11.jpg" width="600" height="100" alt="banner"></td>
      </tr>
     </table>
     </td>
    </tr>
    </td>
          
    <div id="support" style="position: absolute; visibility: visible; width: 135px; height: 15px; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000; z-index: 28; left: 622px; top: 116px;" class="links">
    <a href="../index.htm">Home</a>    | <a href="../******.htm" target="_blank">Support</a> </div>
    
    <script>
     var ld=(document.all);
      var ns4=document.layers;
     var 
    

    Open in new window

    0
    I'm working on a report issue in which the report is failing with the this error: The value " cannot be converted to a number.

    The diff of the fix for the report from an earlier issue is below

    from this:

    where t.NAME<>'PROMPT SB NET 30' -- take out small business terms
    

    Open in new window


    to this:

    where t.NAME='PROMPT SB NET 30' -- take out small business terms
    

    Open in new window


    Is anyone familiar w/ this error? I'm continuing to search but I'm confused as to why this would cause an issue by merely changing  the <> value to =

    thanks
    0
    hello, the current CF code causes the browser pop up blocker. I would like a workaround such that either a new window opens or the same browser page opens the new url. I have tried cflocation too but to no avail. Thanks for helping, Clifford

    <cfif IsDefined("form.btnSubmit")>
       <cfif IsDefined("form.departure")>

            <cfset depDate = parsedatetime(form.departure, "dd MMM yy")>
            <cfset arrDate = parsedatetime(form.arrival, "dd MMM yy")>
            <cfset arrString = DateFormat(arrDate,"d.m.yyyy")>
            <cfset nights = DateDiff("d",arrDate,depDate)>
    <SCRIPT LANGUAGE="javascript">

    window.open ('https://xxx/inquiry.aspx?date=<cfoutput>#arrString#</cfoutput>&nights=<cfoutput>#nights#</cfoutput>&rooms=<cfoutput>#form.txtRooms#</cfoutput>&adults=<cfoutput>#form.txtAdults#&child=#form.txtChild#</cfoutput>&promotion=', );
     
     </SCRIPT>
    <!---      <cflocation url="https://xxx/inquiry.aspx?date=<cfoutput>#arrString#</cfoutput>&nights=<cfoutput>#nights#</cfoutput>&rooms=<cfoutput>#form.txtRooms#</cfoutput>&adults=<cfoutput>#form.txtAdults#&child=#form.txtChild#</cfoutput>&promotion=" addtoken="no"> --->
        </cfif>
    <cfelse>
          
          <cfparam name="form.txtAdults" default="2">
          <cfparam name="form.txtRooms" default="1">
          <cfparam name="form.txtChild" default="0">
          <cfparam name="form.txtCode" default="">
    </cfif>
    0
    I am looking for idea. I need to grab locations , some of the lcoations have the same name but different locationID.

    I need to create a location drop down with a unique locations. And then do the search by these locations. The question  is if I do make a drop down of unique locations thne in my search I will be searching by name instead of locationID
    0
    Hello,

    I am having trouble reading an XML response.  I am not sure if I can explain it well.  I am using XMLParse on the filecontent.

    When I do this directly from the response from the web service I am using, it seems that I am getting just one chunk of XMLText instead of each piece of information with its node label.

    <cfdump var="#xmlparse(httpResponse.filecontent)#">

    If I show the filecontent on the screen, then copy and paste it into notepad and name it something.xml, then run XML Parse, I am able to access the different nodes.

    <cfdump var="#xmlparse("test.xml")#">

    Below is the filecontent that I am able to create an xml document with and read successfully.

    Attached are images of the two cfdump calls.  I think the pictures should explain it.

    I am not sure if this has to do with XMLParse or with the response data that is being returned to me.

    Any help would be much appreciated.  I have been trying to figure this out for two days now and am exhausted...



    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><ExecuteXMLResponse xmlns="http://rossinc.com/webservices/"><ExecuteXMLResult><method name="RS_BIN_TRANSFER"><database>_CONNECTSERVICE</database> <parameters><parameter> <name>ERROR_OCCURRED</name> <value>1</value> </parameter> <parameter> <name>XML_TAGS</name> <value>1</value> …
    0
    Hello Experts-

    I have a list of names that I am calling a db query to pull the IDs, but am having trouble getting the IDs into an actual list.  It is returning 16 487 488 rather than 16,487,488

    <cfset affiliateList = #form.id#><!--- Looks like.... C - DME Media,KC - Floor Coverings International - Google HL,KC - Floor Coverings International - Yahoo --->
        
         <cfloop list="#affiliateList#" index="i" delimiters=",">
            <cfquery name="getAffiliateID" dbtype="query">
                select affiliateID
                from getCampaigns
                where name IN ('#i#')
             </cfquery>
             
         	<cfoutput query="getAffiliateID">
            	<cfset finalList = valuelist(getAffiliateID.affiliateID,",")>
               <cfdump var="#finalList#"> 
             </cfoutput>
         </cfloop> 
    

    Open in new window

    0
    Trying to show member attendance at meetings. The concept here is that we would enter a meeting date, select the various members who attended, then be able to show a listing of which meetings a particular person attended, with the names in the first table column and meeting dates in successive columns. This is the code I am currently using but it gives a lot of false showings for each person

     <cfquery name="getDates" datasource="#conn#">
       select * from meeting_attendance
    </cfquery>
    <cfquery name="getMembers" datasource="#conn#">
       select * from members where member_userid <> 1
       and member_userid IN
             (select member_userid from meeting_attendance where attended = 1)
       order by lastname, firstname
    </cfquery>
    <cfoutput>
    <table>
      <tr>
        <td>&nbsp;</td>
          <cfloop query="getDates" group='meeting_date'>
          <td>#dateformat(getDates.meeting_date, 'mm/dd/yyyy')#</td>
          </cfloop>
      </tr>
      <cfloop query="getMembers">
      <tr>
        <td>#getMembers.firstname# #getMembers.lastname#</td>
          <cfloop query="getDates">
          <td align='center'><cfif attended eq 1>Yes</cfif></td>
          </cfloop>
      </tr>
      </cfloop>
    </table>
    </cfoutput>

    Example of current output

                                09/05/2017
    member name      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Yes      Y
    0
    I'm looking for help with an excel file export from a Cold Fusion form...The html version is working fine but the excel is blank. Has anyone had any issues w/ this. The form is working for the html and pulling from the db. The excel version is just blank with the same parameters.

    The only modification was to increase the max size of a field to 17 from 16 in the index.htm file to account for an increased reference number. Simple change but and the test db has been updated w/ the criteria to pull from but for some reason the excel file isn't populating. I know this is vague but I'm hoping someone can shed some light or at least point me somewhere I can find some assistance. Thanks.
    0
    MySql 5.7 / Coldfusion 11

    I have a real estate property search form with multiple fields for instance  City, Price, Acres, etc... and a Keyword input that needs to be able to further filter these results.   Example: I need to be able to find only properties listed in a certain city by a certain agent the agents name goes in the "keyword" input.

    I have 3 tables in my database that I need to query and do a fulltext search on; "listings",  "fagents", "fcoagents"  
    so I added fulltext index for each.

    ALTER TABLE listings ADD FULLTEXT(Class,Type,SubType,City,PropertyName,Highlights,Remarks,Agent,CoAgent,AddressNumber,AddressStreet,Zipcode);

    ALTER TABLE fagents ADD FULLTEXT(AgentFName,AgentLName,AgentEmail);

    ALTER TABLE fcoagents ADD FULLTEXT(AgentFName,AgentLName,AgentEmail);


    SELECT * FROM listings
    LEFT JOIN fagents ON listings.Agent = fagents.Agent
    LEFT JOIN fcoagents ON listings.CoAgent = fcoagents.CoAgent

    WHERE (Status = "Active" OR Status = "Pending")

    AND

    <!---Search by City--->
    <cfif StructKeyExists(form,"City") and listLen(trim(form.City), ",")>
     AND City IN
            (
                 <cfqueryparam value="#form.City#"
                       cfsqltype="cf_sql_varchar"
                       list="true"
                       separator=",">
         )
    </cfif>

    <!---Search by keywords--->
    <cfif StructKeyExists(form,"Keyword") and len(trim(form.Keyword))>
    AND
    0
    I have been uploading pdf and jpg file from our local server to a hosted server using FTP. However, for security reasons the hosted server stopped the FTP service two weeks ago. The hosted server told us to start using CFHTTP to replace FTP.

    We were using CFFTP for:
    <cfftp action = "open"
    <cfftp action = "remove"
    <cfftp action = "close"
    <cfftp action = "LISTDIR"
          Etc…

    Does anyone have a Coldfusion example on how to transfer file from a local server to hosted server ? I have never used CFHTTP before
    0
    I have a ColdFusion 11 component which is supposed to populate a cfselect using bind. However, the select is not populated with the values at all. It shows blank. These are 2 select form controls that I want to relate to each other. A select from one should populate the other with values based on the selection made.cfselectbind.txtcfselectbind.txt
    0
    I need a form field mask for a date field to read: MM/DD/YY in a cold fusion form.

    I have other fields working but the date field won't take. Would the letters vs. numbers be issue. My current code is setup for the mask:

    <cfset session.invoiceDataContr.Invoice_Date = "MM/DD/YY" >
    

    Open in new window

     <font face="Arial" size="2" color="#990000"><label for="Invoice_Date">Invoice Date:&nbsp;</label>
                            <input  id="Invoice_Date"  name="Invoice_Date" size="15" maxlength="8" type="date"  tabindex="8"  value="<cfif structkeyexists(session.invoiceDataContr, "PASS")><cfoutput>#session.invoiceDataContr.Invoice_Date#</cfoutput><cfelse><cfoutput>#form.Contract_Number#</cfoutput></cfif>" required/>
    

    Open in new window

    0
    I need to validate a date field with MM/DD/YY requirements using a regex within a cold fusion form.
    0
    Current code that's breaking is:

    1:^(([\w\!#$%&'*+-/=?^_`{|}~;]+(?:\.[\w\-_]+)*@(?:[\w\-_]+\.)+[a-zA-Z]{2,7})[;]?)+$
    

    Open in new window


    error message:

    "Error","ajp-bio-8012-exec-5","07/31/17","10:55:57",,"Invalid CFML construct found on line 214 at column 73.ColdFusion was looking at the following text:<p>\'</p><p>The CFML compiler was processing:<ul><li>An expression that began on line 214, column 69.<br>The expression might be missing an ending #, for example, #expr instead of #expr#.<li>The tag attribute pattern, on line 214, column 53.<li>A cfparam tag beginning on line 214, column 6.<li>A cfparam tag beginning on line 214, column 6.<li>A cfparam tag beginning on line 214, column 6.</ul> The specific sequence of files included or processed is: D:\inetpub\wwwroot\centralinv\central_inv_contr_verify.cfm, line: 214"

    I'm guessing the # is throwing an issue and maybe the $ and ^ ... anyone have any ideas to get around the coding errors for those characters:
    0

    ColdFusion Language

    10K

    Solutions

    3K

    Contributors

    ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

    Top Experts In
    ColdFusion Language
    <
    Monthly
    >