Skip to main content

Posts

How to use columns attribute when read a CSV file in ColdFusion

cfhttp - columns attribute when reading a csv file employee1.csv 1, Jenny, Jones 2, Anne, Joli 3, Sonia, Fara cfhttpColumns.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfhttp: how to use columns attribute when read a csv file in coldfusion</title> </head> <body> <h2 style="color:IndianRed; font-style:italic">cfhttp tag example: how to use columns attribute</h2> <hr width="500" align="left" color="IndianRed" /> <br /> <cfhttp method="get" url="http://localhost:8500/cfexample/employee1.csv" name="EmployeeData" columns="EmpID,FirstName,LastName" firstRowAsHeaders="no" > </cfhttp> <table border="1" cellpadding="5" cellspacing=...

How to use get method in cfhttp in ColdFusion

cfhttp - get method employee2.csv EmpID, FirstName, LastName 1, Jenny, Jones 2, Mona, Lisa 3, Faria, Ruma 4, Suria, Sen cfhttpGetMethod.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfhttp: how to use get method in cfhttp tag in coldfusion</title> </head> <body> <h2 style="color:DarkSeaGreen; font-style:italic">cfhttp tag example: how to use get method</h2> <hr width="425" align="left" color="DarkSeaGreen" /> <br /> <cfhttp method="get" url="http://localhost:8500/cfexample/employee2.csv" name="EmployeeList" > </cfhttp> <table border="1" cellpadding="5" cellspacing="0" bordercolor="CornFlowerBlue"> <tr bgcolor="DodgerBlue...

CFhttp - Using delimiter when reading a CSV file in ColdFusion

cfhttp - delimiter attribute employee.csv Emp_ID; FirstName; LastName 1; Jenny; Jones 2; Anne; Patel 3; Sonia; Akter cfhttpDelimiter.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfhttp: how to use delimiter attribute when read a csv file in coldfusion</title> </head> <body> <h2 style="color:DeepPink; font-style:italic">cfhttp tag example: how to use delimiter attribute</h2> <hr width="500" align="left" color="OrangeRed" /> <br /> <cfhttp method="get" url="http://localhost:8500/cfexample/employee.csv" name="EmployeeData" delimiter=";" > </cfhttp> <table border="1" cellpadding="5" cellspacing="0" bordercolor="Crimson">...

ColdFusion CFDIV Bind: Show query data without page refresh

Introduction In Adobe ColdFusion, dynamic web applications can be easily built using server-side scripting. One powerful feature of ColdFusion is its ability to update parts of a webpage without refreshing the entire page, thanks to the use of AJAX-powered components like <cfdiv> . This example demonstrates how to use the <cfdiv> tag with the bind attribute to dynamically display query data based on user selection, without causing a full page refresh. This technique enhances user experience by making the interface more interactive and responsive. The tutorial involves two ColdFusion templates: cfdivBind.cfm and EmployeeDetails.cfm . The first template contains a form where users can select an employee, and the second template retrieves and displays the employee details based on the selection. This workflow showcases how ColdFusion can simplify AJAX functionality with minimal code, ensuring that server interactions are efficient and seamless. Overview of the Main Template...

ColdFusion CFTEXTAREA: Rich text area with basic toolbar

Introduction In this tutorial, we will explore how to use the cftextarea tag in Adobe ColdFusion to create a rich text area with a basic toolbar in a web form. ColdFusion's cftextarea is a versatile tag that allows developers to include text areas with rich text editing capabilities in their web applications, enhancing user input experience by providing them with a simple text formatting tool. This example demonstrates the creation of a form where users can submit their favorite colors, using a rich text-enabled textarea. We will break down the code step-by-step, explaining how the cftextarea tag works, how form submission is handled, and how ColdFusion outputs the data. By the end of this article, you will have a clear understanding of how to implement a similar functionality in your ColdFusion applications. Page Structure and Metadata The code begins with an HTML document structure that defines a simple page with proper encoding through the <meta> tag, setting UTF-8 as...

How to create simple text area in ColdFusion

Introduction In Adobe ColdFusion, building simple and interactive forms is made easy with built-in tags such as <cfform> and <cftextarea> . This tutorial demonstrates how to create a basic text area input form using these ColdFusion tags. The example focuses on capturing user input, specifically an address, and displaying it dynamically upon submission. This simple tutorial helps developers understand how to integrate basic ColdFusion form functionality into their web applications. The use of ColdFusion tags like <cftextarea> and <cfinput> streamlines form creation and provides additional validation and customization options, making it a powerful tool for web developers looking to enhance user experience with minimal effort. Understanding the Structure The example begins with a basic HTML structure where the title and metadata are set up using standard HTML tags. The body section contains the form components that are defined using ColdFusion's server-side...

ColdFusion: Create an authentication system using CFLOGIN, CFLOGINUSER and CFLOGOUT

Introduction In this tutorial, we will explore how to create a simple authentication system using Adobe ColdFusion's built-in tags like cflogin , cfloginuser , and cflogout . ColdFusion provides an easy and efficient way to manage user authentication by leveraging these tags, allowing developers to implement login and logout functionalities with minimal effort. In this article, we will break down a practical example that demonstrates how these tags work together to manage user sessions and protect content from unauthorized access. The provided example showcases a basic authentication system that checks the user’s credentials, logs them in if correct, and provides the option to log out. It also features a conditional display of protected content, which is only visible to authenticated users. Let’s walk through each part of this example to understand how ColdFusion handles user authentication. Handling User Login The core of the authentication system begins with a conditional block t...