Whatever message this page gives is out now! Go check it out!

Code samples to build a mobile application

Last update:
May 18, 2026
Warning:
All mobile and mobile-related features are removed in ColdFusion (2025 release).
View Deprecated features in ColdFusion for more information.

A simple example

Building mobile applications using the ColdFusion Mobile Platform is easy. Your code will be as simple as:
<cfclient>
 <cfset myvar = "Hello World">
 <cfoutput>#myvar#</cfoutput>
 </cfclient>
Note the new ColdFusion tag, <cfclient> that will be used for mobile development (see The new <cfclient> tag). The ColdFusion content available in the <cfclient> block gets translated into corresponding HTML/JavaScript content.

A more complex example
Let us launch the device camera:
<cfclient>
 <cfscript>
 
 function launchCamera()
 {
 // Capture the image from the device comera
 var opt = cfclient.camera.getOptions();
 var resp = cfclient.camera.getPicture(opt);
 var fileContent = cfclient.file.readFileURIAsBase64(resp);
 // Process the image
 return;
 }
 
 </cfscript>
 </cfclient>
Examples
Community posts and tutorials

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page