Skip to main content

Posts

Showing posts with the label tags

CFMAP - Generate an earth type google map in ColdFusion

CFmap - earth type Google map cfmaptypeearth.cfm <!DOCTYPE html"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfmap tag - how to generate earth type google map in coldfusion</title> </head> <body style="margin:5px 5px 5px 15px;"> <h2 style="color:IndianRed; font-style:italic"> cfmap tag - how to generate earth <br /> type google map in coldfusion </h2> <hr width="525" align="left" color="Pink" /> <br /> <!--- Generate a Google map api key for this domain http://localhost:8500/ ---------------- Use your own google map api key to test this example ---> <cfajaximport params="#{googlemapkey='please use your own google map api key here'}#"> <cfmap centeraddress="Nebraska" heigh...

CFMAP - How to change google map marker color in ColdFusion

CFmap - Marker color in Google map cfmapmarkercolor.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfmap tag - how to change marker color in google map in coldfusion</title> </head> <body style="margin:5px 5px 5px 15px;"> <h2 style="color:DarkBlue; font-style:italic"> cfmap tag - how to change marker color <br /> in google map in coldfusion </h2> <hr width="525" align="left" color="DarkBlue" /> <br /> <!--- Generate a Google map api key for this domain http://localhost:8500/ ---------------- Use your own google map api key to test this example ---> <cfajaximport params="#{googlemapkey='please use your own google map api key here'}#"> <table> <tr> <td> ...

Generate a google map with specific latitude and longitude in ColdFusion

cfmap - generate google map with specific latitude and longitude as map center address cfmaplatitudelongitude.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>How to generate google map with specific latitude and longitude as map center address</title> </head> <body style="margin:5px 5px 5px 15px;"> <h2 style="color:DarkBlue; font-style:italic"> How to generate google map with specific <br /> latitude and longitude as map center address </h2> <hr width="525" align="left" color="DarkBlue" /> <br /> <!--- Generate a Google map api key for this domain http://localhost:8500/ ---------------- Use your own google map api key to test this example ---> <cfajaximport params="#{googlemapkey='please use you...

CFAJAXIMPORT to specify Google map API Key in ColdFusion

CFajaximport - params attribute to specify Google map API Key cfajaximportparams.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>How to use cfajaximport params attribute to specify Google map API Key in coldfusion</title> </head> <body style="margin:5px 5px 5px 15px;"> <h2 style="color:DarkBlue; font-style:italic"> How to use cfajaximport params attribute <br /> to specify Google map API Key in coldfusion </h2> <hr width="400" align="left" color="PowderBlue" /> <br /> <!--- Generate a Google map api key for this domain http://localhost:8500/ ---------------- Use your own google map api key to test this example ---> <cfajaximport params="#{googlemapkey='please use your own Google map API Key here...

cfqueryparam- how to use cfqueryparam in cfquery tag

cfqueryparam Usingcfqueryparam.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfqueryparam- how to use cfqueryparam in cfquery tag</title> </head> <body> <h2 style="color:DarkBlue; font-style:italic">ColdFusion cfqueryparam tag example: how to use cfqueryparam</h2> <hr width="600" align="left" color="PowderBlue" /> <br /> <cfparam name="url.BookID" default="0"> <cfquery name="Books" datasource="cfbookclub"> select BookID, Title from Books where BookID = <cfqueryparam value="#url.BookID#" cfsqltype="cf_sql_integer"> </cfquery> <div style="font-family:'Courier New', Courier, monospace; font-size:large;"> <a href=...

How to use cfsqltype in cfqueryparam tag in ColdFusion

CFqueryparam and CFsqltype Usingcfsqltype.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfqueryparam and cfsqltype - how to use cfsqltype in cfqueryparam tag</title> </head> <body> <h2 style="color:DarkBlue; font-style:italic">ColdFusion cfqueryparam tag example: how to use cfsqltype</h2> <hr width="600" align="left" color="PowderBlue" /> <br /> <cfparam name="url.EmpID" default="0"> <cfquery name="qEmploees" datasource="cfdocexamples"> select Emp_ID, FirstName, LastName from Employee where Emp_ID = <cfqueryparam value="#url.EmpID#" cfsqltype="cf_sql_integer"> </cfquery> <div style=" font-family:'Lucida Sans Unicode', 'Lu...

How to Create a Microsoft Word Document in ColdFusion

Introduction In web development, generating documents dynamically, such as Microsoft Word files, can be highly valuable for businesses and users. ColdFusion, a powerful and flexible web development platform, allows developers to easily create Word documents using its built-in cfcontent tag. This tutorial demonstrates a practical example of how to output database query results into a Microsoft Word document using ColdFusion, showcasing how user-friendly the process can be. In this tutorial, we will cover two ColdFusion scripts: one for creating a hyperlink that triggers the Word document generation and another that processes the data from a database query and outputs it as a Word document. The focus will be on using the cfcontent tag to define the MIME type for Word files and how to structure and output the desired content. Overview of cfcontentMSWord.cfm The first part of the tutorial involves setting up a simple HTML page to serve as the user interface. The HTML file, named cfconten...

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

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