Let's create an example where we can use a few single tags.
In our <Railo Install Directory>/webroot/Chapter_3/
folder, let's create a file called tag_example.cfm
.
In this tag, let's add a form and some code that will respond to changes in a checkbox:
<cfparam name="FORM.doexecute" default="false"> <h1 id="logic_example">Logic Example</h1> <form action="tag_example.cfm" method="post"> <label for="execute">Execute</label><input type="checkbox" name="doexecute" value="true" id="execute"> <p><input type="submit" value="Submit"></p> </form> <cfset output = ""> <cfif FORM.doexecute> <cfset output = "We are going to execute some code!"> <cfelse> Aborted! <cfabort> </cfif> <cfoutput>#output#</cfoutput> <br> This is the end of the file
Let's run this in the browser by going to http://localhost:8888/Chapter_3/tag_example.cfm
.You will see...