Viewers: in countries Watching now:
ColdFusion 9 Essential Training is a detailed overview of ColdFusion, demonstrating each of the components and tools necessary to create dynamic web sites and web applications. Author and web developer David Gassner starts this course at the very beginning: how to set up a ColdFusion application server in both the Windows and Mac OS X operating systems. Using the new ColdFusion Builder, David explains the data types and code necessary to build and deploy dynamic web pages. Throughout the course, he shows how to build web pages and forms and populate these containers with dynamic data using ColdFusion ORM (Object Relational Mapping), a new feature of ColdFusion 9. Exercise files accompany this course.
You create the function and you set it up to be called the way the Message Box knows how to call it and then you add a bit of code to link it all together. I'm still working in the index.cfm file, in the photographers directory of the application. I'll start by creating a function that will be called when the user clicks either the Yes or the No box on the MessageBox component. I will name my new function doDelete. Because this is going to be set up as a callback function for the MessageBox component, it will be called in a certain way.
It's going to be passed a parameter and the parameter's value will be the name of the button that was clicked in lowercase. I will name this parameter btn. Then I will create a pair of curly braces and within the function I'm going to use an alert method and just output the value of that parameter or argument that was passed in, btn. So now, to test that function I'll go down to the cfmessagebox tag. In the cfmessagebox tag I'll add a new attribute named callbackhandler.
So that's how callback functions work in the world of Ajax and in the world of the new ColdFusion Ajax tools such as the ColdFusion MessageBox component. Represented here with the cfmessagebox tag and activated by the call to ColdFusion.MessageBox.show. The doDelete function will now be responsible for responding to when the user clicks one of the two buttons and I'll finish this entire workflow in the final video of this chapter.
Find answers to the most frequently asked questions about ColdFusion 9 Essential Training .
Here are the FAQs that matched your search "" :
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.