This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Aaron Greenlee | |
http://aarongreenlee.com/ | |
This work is licensed under a Creative Commons Attribution-Share-Alike 3.0 | |
Unported License. | |
// Original Info ----------------------------------------------------------- | |
Author : Aaron Greenlee | |
Created : 01/12/2011 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Aaron Greenlee | |
http://aarongreenlee.com/ | |
This work is licensed under a Creative Commons Attribution-Share-Alike 3.0 | |
Unported License. | |
// Original Info ----------------------------------------------------------- | |
Author : Aaron Greenlee | |
Created : 10/01/2010 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title>ValidateThis! Demo Page</title> | |
<link href="/stylesheets/demostyle.css" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/stylesheets/uni-form-styles.css" media="all" rel="stylesheet" type="text/css" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
This will create two variables for the page too be outputted: | |
OUTPUT: | |
CAPTCHA_DISPLAY - captcha fields/image | |
CAPTCHA_ERROR - error message of captcha failure | |
blnIsBot - is this a bot | |
http://www.bennadel.com/blog/873-Using-CAPTCHA-In-ColdFusion-8.htm | |
---> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- place in /controllers folder---> | |
<cfcomponent extends="Controller"> | |
<cffunction name="getdemo" returntype="Query" access="private" > | |
<cfset var entries = model("entry").findAll(select="BODY,CATEGORYID,TITLE,dateCreated") /> | |
<cfreturn entries /> | |
</cffunction> | |
<cffunction name="init"> | |
<cfset filters(through="turnOffDebugging",only="processing")> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- place in views/say folder ---> | |
<cfoutput> | |
#javaScriptIncludeTag("jquery-1.4.2.min")# | |
</cfoutput> | |
<script language="JavaScript"> | |
// Listen to the "click" event of the "alert-button" link and make an AJAX request | |
$(document).ready(function(){$("#alert-button").click(function() { | |
$.ajax({ | |
type: "POST", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
Let's generate our default HTML documentation on Wheels: | |
---> | |
<cfscript> | |
version = "1.0.5"; | |
wheels = createObject("component", "ColdDoc").init(); | |
strategy = createObject("component", "colddoc.strategy.api.HTMLAPIStrategy").init( | |
expandPath("docs"), | |
"ColdFusion On Wheels #version#"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- on initial request, run query ---> | |
<cfset "session.#attributes.myactionfile#" = "" /> | |
<cfsavecontent variable="datasorter_js"> | |
<style type="text/css" title="currentStyle"> | |
@import "css/datatables_table.css"; | |
</style> | |
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent extends="Controller" output="false"> | |
<cffunction name="show"> | |
<cfset student = model("Student").findByKey(key=1, include="Enrollments") /> | |
<cfset course = model("Course").findByKey(key=2, include="Enrollments") /> | |
</cffunction> | |
</cfcomponent > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent extends="Controller" output="false"> | |
# ... | |
<cffunction name="show"> | |
<!--- Find the record ---> | |
<cfset entry = model("Entry").findByKey(params.key)> | |
# ... | |
</cffunction> | |
<cffunction name="edit"> |