Amazon.com Widgets

ColdFusion 8 - Binding cfselect to cfdiv

David OMalley sent me a snippet of interesting code.  While playing around with the HostMySite.com CF8 Scorpio Beta, he discovered a simple way to bind <cfselect> to a <div>.  This little trick could prove useful!  A sample of the working code can be found here:

http://h127188.cf8beta.com/courses.cfm

<cfform name="test">
   <cfselect name="courses">
      <option value="courseInformation.cfm">Course Information</option>
      <option value="course1.cfm">Course1</option>
      <option value="course2.cfm">Course2</option>
      <option value="course3.cfm">Course3</option>
   </cfselect>
</cfform>

<cfdiv bind="url:{courses}">

Comments
Steve's Gravatar Testing
# Posted By Steve | 6/8/07 3:58 PM
Mat's Gravatar Hi

I have been trying the tag and keep getting this error."The tag requires the attribute(s): SOURCE. "

Thanks, Mat
# Posted By Mat | 6/13/07 6:37 AM
David's Gravatar Hi Mat - you are getting the error on the tag?

David
# Posted By David | 6/13/07 8:01 AM
David's Gravatar ...I meant to say, on the cfdiv tag?

Also, your setup - are you running CF8? The latest Beta?
# Posted By David | 6/13/07 8:03 AM

Raymond Camden's BlogCFC version 5.8.001