Skip to main content

Posts

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...

How to disable date range of a Calendar in ColdFusion

cfcalendar - disable date range cfcalendarStartRangeEndRange.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfcalendar tag: how to disable date range (startRange, endrange) in calendar in coldfusion</title> </head> <body> <h2 style="color:OliveDrab; font-style:italic">cfcalendar tag example: how to use startrange, endrange attribute</h2> <hr width="625" align="left" color="Olive" /> <br /> <cfif IsDefined("Form.SubmitClassDate")> <cfoutput> <h3 style="color:DarkSeaGreen;"> Next Class Date Is: #DateFormat(Form.ClassDate)# </h3> </cfoutput> </cfif> <cfform name="CalendarStartRangeEndRangeTest" method="post" format="html"> <table bo...

How to change Calendar selected date in ColdFusion

cfcalendar - set change selected date cfcalendarSelectedDate.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfcalendar tag: how to set change selected date in calendar in coldfusion</title> </head> <body> <h2 style="color:Crimson; font-style:italic">cfcalendar tag example: how to use selecteddate attribute</h2> <hr width="575" align="left" color="Crimson" /> <br /> <cfif IsDefined("Form.SubmitConferenceDate")> <cfoutput> <h3 style="color:SaddleBrown;"> Next Conference Date Is: #DateFormat(Form.ConferenceDate)# </h3> </cfoutput> </cfif> <cfform name="CalendarSelectedDateTest" method="post" format="html"> <table border="1...

How to change calendar day names in ColdFusion

Introduction ColdFusion offers a variety of built-in tags that make web development easier by allowing developers to build dynamic features with minimal code. One such tag is <cfcalendar> , which provides a simple way to display a calendar control on a web page. This tutorial will guide you through how to customize the names of the days in a ColdFusion calendar using the daynames attribute. This example demonstrates how to change the default day names in the calendar control, allowing for greater flexibility and customization in your web applications. Overview of the Code Structure The example code presents a basic HTML structure combined with ColdFusion components to create an interactive calendar form. It allows users to select an arrival date and displays the selected date back to the user after submission. The main focus of this tutorial is the customization of the day names within the calendar, a feature that enhances user experience by allowing developers to modify the way...