Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6895841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:57:36+00:00 2026-05-27T06:57:36+00:00

I am building some functionality similar to a survey in a web application where

  • 0

I am building some functionality similar to a survey in a web application where the user is presented with a list of questions to read over. There is a link at the bottom of the questions to answer the questions. When the user clicks the link to answer the questions they are presented with a Modal PopUp window that has a repeater built in. The repeater displays the question, as well as a radio button list as possible answers. Each answer must have justification so there is a justification box next to the answers. If a user selects the answer “Below” (value is a B) then a textbox needs to appear for the user to put in their corrective action/preventative measures. I have all of this functionality working right now, except when a user selects “Below”, all of the corrective boxes appear throughout the repeater, instead of in the respected repeater row. How can I accomplish only having the textbox show on the row of the “Below” answer?

Code snips:

<script type="text/javascript">
$(document).ready(function () {
    $("input:radio").change(function (eventObject) {
        var type = $.trim($(this).val());
        if (type == "B") {
            alert("Clicked"); //Testing...
            $('.tblPreventative').show();
        }
        else
            $('.tblPreventative').hide();
    });

});

<asp:Repeater runat="server" ID="rptQuestions">
        <ItemTemplate>
            <div class="AnswerSection">
                <div class="question">
                <asp:Label runat="server" ID="lblQuestId" Text='<%#Eval("guidQuestionId")%>' Visible="false" />
                    <%#Eval("strQuestion")%>
                </div>
                <div class="answer">
                <table width="100%">
                    <tr>
                        <td width="10%">
                            <asp:RadioButtonList runat="server" ID="rbAnswer">
                                <asp:ListItem Text="Meets" Value="M" />
                                <asp:ListItem Text="Above" Value="A" />
                                <asp:ListItem Text="Below" Value="B" />
                                <asp:ListItem Text="N/A" Value="N" />
                            </asp:RadioButtonList>
                            <asp:RequiredFieldValidator ID="rqfvRBAnswer" runat="server" ControlToValidate="rbAnswer" ErrorMessage="You must select an Assessment." ForeColor="Red" />
                        </td>
                        <td valign="top" width="90%" style="padding-right:5px">
                            <strong>Justification</strong>
                            <br />
                            <asp:TextBox ID="txtJustification" runat="server" TextMode="MultiLine" Width="100%" Height="70px" />
                            <asp:RequiredFieldValidator ID="rqfvJustification" runat="server" ControlToValidate="txtJustification" ErrorMessage="Please input a justification." ForeColor="Red" />
                        </td>
                    </tr>
                    <tbody class="tblPreventative" style="display:none;">
                    <tr>
                         <td width="10%">
                         </td>
                         <td valign="top" width="90%" style="padding-right:5px">
                         <strong>Corrective Action</strong>
                            <br />
                            <asp:TextBox ID="txtPreventative" runat="server" TextMode="MultiLine" Width="100%" Height="70px"/>
                         </td>
                    </tr>
                    </tbody>
                </table>

                </div>
            </div>
            <br />
        </ItemTemplate>
    </asp:Repeater>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:57:37+00:00Added an answer on May 27, 2026 at 6:57 am

    Try this script:

    $(document).ready(function () {
         $("input:radio").change(function (eventObject) {
              var type = $.trim($(this).val());
              if (type == "B") {
                   alert("Clicked"); //Testing...
                   $(this).closest("tr").next("tbody").show();
              }
              else
                   $(this).closest("tr").next("tbody").hide();
         });
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking at building some web user controls with an eye toward re-use, but
I'm building a web application which will include functionality that takes MS Word (and
I'm building a widget which allows user to copy items from one list over
When building some of my PHP apps, a lot of the functionality could be
I'm building some functional tests for a web site using Selenium, and I'm stuck
Is there a compression API available for use on the iPhone? We're building some
I'm building a prototype game and have some multiplayer functionality hooked up. I am
I'm in the research phase for a web application I'm considering building and need
We are building a configurator application for conveyors. Basically user comes in and picks
I am building a web app targeting the iPhone. It is similar to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.