Skip to main content
Inspiring
August 2, 2007
Question

updating cfdiv onclick

  • August 2, 2007
  • 1 reply
  • 557 views
Greetings all. I see in the docs how to bind cfdiv to a form field, but how
does one interact/update the div on click? or possibly cfdiv isn't what I
want at all.

basically, i have an area that, onload, i want to be invisible. clicking on
any number of links in the page will open that area and that area will
refresh itself with content from a URL, depending on the value that the link
sets. so lets say you click on link1, and it that link has a param of
?att=1, and so the div sees that attribute and fetches mypage.cfm?att={att}
or some such thing.

what's the preferred way of getting this functionality in CF8?

thanks a lot.

Marc


    This topic has been closed for replies.

    1 reply

    Participating Frequently
    August 13, 2007
    How about something like this?

    <cfdiv bind="url:something.cfm" id="yo" style="display: none;" />

    <cfform action="yo.cfm" method="POST">
    <cfinput type="Checkbox" name="showSomething" visible="Yes" enabled="Yes" onClick="yo.style.display='block'">
    </cfform>

    Very basic. Need more if you want to deal with unchecking it.