Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 9 of 9 FirstFirst ... 789
Results 121 to 124 of 124
  1. #121
    Regular Coder
    Join Date
    Apr 2013
    Posts
    112
    Thanks
    1
    Thanked 0 Times in 0 Posts
    you know what post im talking about

  2. #122
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,576
    Thanks
    80
    Thanked 4,497 Times in 4,461 Posts
    No, I really don't. Too many of them.

    The closest I can see to what you are talking about--affecting what is shown and validated in the "office use only form" (that is, the comments form)--are my posts #107 and #116.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  3. #123
    Regular Coder
    Join Date
    Apr 2013
    Posts
    112
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    No, I really don't. Too many of them.

    The closest I can see to what you are talking about--affecting what is shown and validated in the "office use only form" (that is, the comments form)--are my posts #107 and #116.
    Yes you are right dude , page 8 of the assignment. pdf then i'm practically done lol.. mind helping me Alot with this part?

  4. #124
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,576
    Thanks
    80
    Thanked 4,497 Times in 4,461 Posts
    But helping you with what?

    I can't write it for you. Besides the fact I don't have the time, I don't even have PHP on my computer.

    How hard can it be, though?

    If the parent answered X to question A, then include section Z in the comments_form.php output.
    Code:
    <?php
    if ( $questionA == "X" )
    {
    ?>
    <div id="sectionZ">
        Did you brush your teeth today? 
        <input name="brush" type="radio" value="yes"> Yes
        <input name="brush" type="radio" value="no"> No
    </div>
    <?php
    }
    ?>
        ... and the same for other optional parts of the form ...
    ...
    And then, in the JS part of the page:
    Code:
    function validateForm( )
    {
        var form = document.getElementById("idOfTheForm");
    <?php
    if ( $questionA == "X" )
    {
    ?>
        var rbs = form.brush;
        if ( !rbs[0].checked && !rbs[1].checked )
        {
            alert("You must answer the question about brushing your teeth");
            return false;
        }
    <?php
    }
    ?>
        ... and the same for other optional parts of the form ...
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


 
Page 9 of 9 FirstFirst ... 789

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •