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 7402339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:43:10+00:00 2026-05-29T04:43:10+00:00

I have an application you can access here When you open the app, please

  • 0

I have an application you can access here

When you open the app, please click on the “Open Grid” and select any of the numbered options. You will see some letters buttons (A, B, C etc) Then in the textbox below type in number “0”. After you have done this then click on the “Add Question” button.

The problem is that after you have added a row, the A,B,C… buttons at the top is not displayed which is fine, but it also does not display the A,B,C… buttons in the row you have added. Why is it not displaying the A,B,C … buttons in the added row because I have stated that after the “Add Question” button is clicked, to not display the A,B,C buttons on top, not to hide the A,B,C buttons in the added rows.

Below is the html code where the A,B,C… buttons appear on top:

…

<tr class="answer">
<td>Answer</td>
<td>

<?php
    $a = range("A","Z");
?>

<table id="answerSection">
    <tr>

<?php
    $i = 1;
    foreach($a as $key => $val){
        if($i%7 == 1) echo"<tr><td>";
        echo"<input type=\"button\" onclick=\"btnclick(this);\" value=\"$val\" id=\"answer".$val."\" name=\"answer".$val."Name\" class=\"answerBtns answers answerBtnsOff\">";      
        if($i%7 == 0) echo"</td></tr>";
        $i++;
    }
?>
    </tr>
    <tr>
<td>
<input class="answerBtns answers" name="answerTrueName"  id="answerTrue"    type="button"   value="True"    onclick="btnclick(this);"/>
<input class="answerBtns answers" name="answerFalseName" id="answerFalse"   type="button"   value="False"   onclick="btnclick(this);"/>
<input class="answerBtns answers" name="answerYesName"   id="answerYes"     type="button"   value="Yes"     onclick="btnclick(this);"/>
<input class="answerBtns answers" name="answerNoName"    id="answerNo"      type="button"   value="No"      onclick="btnclick(this);"/>
</td>
</tr>
</table>

…

Below is the jquery code where the A,B,C… buttons are displayed in the added rows and the css which is suppose to not display the A,B,C… buttons on top control:

function insertQuestion(form) {   

            var context = $('#optionAndAnswer');
    var currenttotal = context.find('.answerBtnsOn').length;        



    var $tbody = $('#qandatbl > tbody'); 
    var $tr = $("<tr class='optionAndAnswer' align='center'></tr>");
    var $answer = $("<td class='answer'></td>");


var $this, i=0, $row, $cell;
$('#optionAndAnswer .answers').each(function() {
    $this = $(this);
    if(i%7 == 0) {
        $row = $("<tr/>").appendTo($answer);
        $cell = $("<td/>").appendTo($row);
    }
    var $newBtn = $("<input class='answerBtnsRow answers' type='button' style='display:%s;' onclick='btnclick(this);' />".replace('%s',$this.is(':visible')?'inline-block':'none')).attr('name', $this.attr('name')).attr('value', $this.val()).attr('class', $this.attr('class'));


    $newBtn.appendTo($cell);

    i++;
});


    $tr.append($answer);  
    $tbody.append($tr); 


    $('.answerBtns').css('display', 'none');

}

Thanks

  • 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-29T04:43:11+00:00Added an answer on May 29, 2026 at 4:43 am

    This line:

    $('.answerBtns').css('display', 'none');
    

    Will hide all elements with the class “answerBtns”, which as far as I can tell includes all of your “A”, “B”, “C” buttons in all parts of the page.

    You need to make your selector more specific by, e.g., specifying the containing element as well:

    $('#optionAndAnswer .answerBtns').css('display', 'none');
    

    So that it only hides the particular ones you care about. Or give the answer buttons in the bottom section of the page a different class. Either (or both) should do it.

    (By the way, you can hide them more easily with $('.answerBtns').hide();.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object created in a host application and can access it remotely
I have built a MS Access 2007 application that can create reports files in
I have an application where users can upload video files of any size, and
If I have an ASP.Net MVC applicaiton where users can only access via an
I need to make so that my application can have only one instance running
In C++, a console application can have a message handler in its WinMain procedure,
I have an application where users can store items. Now each type of account
I have an application where I can launch a modal dialog box over a
I have an application where I can have an image moving towards the eye.
I have a web application that can load plugins through reflection. It currently uses

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.