Rob Gonda's Blog

ajaxCFC Update: addOptions() - serializeForm()

I just updated the ajaxCFC distribution files to include an update to the addOptions() utility. The y! group has been talking about passing a CF Query to the addOptions() function for a few weeks and thanks to the contribution of Jeff Lester it's possible now. It behaves exactly like the addRows() function, where it takes _cell_ functions to get the value and text of the returned query. It is usually easier to learn by example, so check out how it's done.

Additionally, some of you must be familiar and frustrated with the lack of ability of passing an entire form as an object; if you try, you'd get an maximum recursion error. I wrote a small function in my contact manager example that takes a form and serialize it into a JavaScript object, so I chose to include it into the DWRUtil namespace... You can now call x = DWRUtil.serializeForm(document.frm) and pass it to your Ajax call.

TrackBacks
There are no trackbacks for this entry.

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?C5090FB5-3048-7431-E400742948EF3856

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
This blog is running version 5.9.003. Contact Blog Owner