• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 17. Using JavaScript and ColdFus... > Passing Data to JavaScript Using <cf...

Passing Data to JavaScript Using <cfwddx>

So far in this chapter, you have seen how to pass variables from ColdFusion to JavaScript by generating the appropriate script code on the fly, using <cfoutput> and other basic CFML tags. The listings have worked out just fine; there is nothing wrong with this approach. For lack of a better term, I'm going to call this the roll-your-own approach to passing variables to JavaScript.

ColdFusion provides a higher-level tool for passing variables to JavaScript: the CFML2JS action of the <cfwddx> tag. You were introduced to <cfwddx> in Chapter 16, “Using WDDX.” That chapter explained how to use the tag to serialize and deserialize data in WDDX packets (a form of XML).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint