#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Baltimore, MD
    Posts
    12
    Rep Power
    0

    CheckBox Problem! please help!


    I have a database driven application. It's called Production Calendar. By checking a checkbox next to a record this record needs to disappear from the page but stay in the database. How do I do that??? Please note, that the application already has a submit button, so do I need to create a separate button for that???? Please help!!! Is there another way to remove a record from a page????
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,243
    Rep Power
    967
    This isn't a ColdFusion question. I think you're looking for information on DHTML layers or CSS. I don't know much about these. If someone else does feel free to answer, but otherwise you may want to ask this question in a DHTML forum.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    13
    you could use javascript to do an onclick form submit, but i, like kiteless don't know much about that. sorry.

    later
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    54
    Rep Power
    11
    You can wrap each record in a div and then use javascript to hide the div when the check box is clicked. The sample below will hide the record on the page. I don't know if you'd need the option to show it again though. That would require a more involved javascript function. The function as written below will only work with web standards browsers that support document.getElementById. You can throw a detect clause in the function to prevent errors on out of date browsers.

    Code:
    <script type="text/javascript" language="javascript">
    function showHide(layerName) {
        document.getElementById(layerName).style.display = "none"
    }
    </script>
    
    <div id="myDiv">
    <p><input type="checkbox" onclick="showHide('myDiv')"> My Record</p>
    </div>

IMN logo majestic logo threadwatch logo seochat tools logo