Skip to main content
Inspiring
Feb 5, 2013 11:14 PM UTC
Answered

cfdiv bind with checkbox - unchecked box

I've got a cfdiv and binding it to a checkbox. When the checkbox is checked, it shows the value of the checkbox in the div as expected. How can I get rid of that value if/when the checkbox is unchecked?

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Dan_BracukCorrect answer
    Inspiring
    Feb 6, 2013 12:02 AM UTC

    If all you are doing is showing the value of the checkbox, I suggest straight javascript instead of binding.  Call the script in the onchange event of the box.

    3 replies

    Dan_BracukCorrect answer
    Inspiring
    Feb 6, 2013 12:02 AM UTC

    If all you are doing is showing the value of the checkbox, I suggest straight javascript instead of binding.  Call the script in the onchange event of the box.

    Translate
    Squiggy2Author
    Inspiring
    Feb 6, 2013 12:05 AM UTC

    Good idea. I'll give that a shot.

    Translate
    Squiggy2Author
    Inspiring
    Feb 6, 2013 1:11 AM UTC

    Javascript worked like a charm. I thought by hiding items in a form with javascript that those fields would still be sent to the next page, but they're not. Fantastic. Thanks for pointing me to js.

    Translate