How do I unhide a CFDIV that has dynamic content with AJAX binding itself?

Posted by Eric Belair on Stack Overflow See other posts from Stack Overflow or by Eric Belair
Published on 2010-04-28T21:04:06Z Indexed on 2010/04/28 21:07 UTC
Read the original article Hit count: 245

Filed under:
|
|
|

I have the following CFSELECT tags that are used to populate a text input:

<cfselect id="this" name="this" bind="cfc:Data.getThis()" bindonload="true" />

<cfselect id="that" name="that" bind="cfc:Data.getThat({p1})" />

<cfselect id="theOther" name="theOther" bind="cfc:Data.getTheOther({p1}, {p2})" />

The text input is the only value that needs to be submitted in a form:

<cfform name="addItem" method="post" action="somepage.cfm">
    <cfinput 
        type="text" 
        id="item" 
        name="item" 
        bind="cfc:Data.getResult({this}, {that}, {theOther})" /><br />

    <cfinput 
        type="submit" 
        name="addButton" 
        value="Add Item" />
</cfform>

I want the form and it's contents to be visible only when all three selections have been made, and there is a value for the text input. What is the best way to do this? I'm assuming some use of CFDIV is the best way, but I'm not sure how to load the dynamic content (the CFINPUTs) this way.

© Stack Overflow or respective owner

Related posts about coldfusion

Related posts about cfdiv