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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:51:10+00:00 2026-05-27T15:51:10+00:00

Please follow these steps in the jsfiddle to understand my question Click on open

  • 0

Please follow these steps in the jsfiddle to understand my question

  1. Click on open grid link and select option “3”, buttons A,B and C would appear

  2. Enter in number 2 in the number of Answers textbox. Then select buttons A and C

  3. Now click on the open grid again and select option 6.

  4. Now the number of Answers textbox is empty so type in 2 again in the text-box. So only 2 answers should be selected and as A and C is already selected, it should not allow another button to be selected (an alert should appear)

But this does not happen. Instead the user can select another 2 buttons and then the alert message would appear if another button is selected. This means you see 4 buttons being selected which is incorrect, it should still be 2.

So does anyone have an idea why it is doing this? It probably because the click count which somenbody mentioned is being reset everytime the grid is opened and another option is chosen.

Thanks

Code is in jsfiddle, click here

  • 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-27T15:51:11+00:00Added an answer on May 27, 2026 at 3:51 pm

    Change this lines in the btnclick function:

    if (document.getElementById("numberAnswerTxt").value == currenttotal) {
        alert('You are not allowed beyond the limit of the number of answers you require, deselect other button');
    

    To this:

    currenttotal = $('.answerBtnsOn').length;
    if (int(document.getElementById("numberAnswerTxt").value) == currenttotal) {
        alert('You are not allowed beyond the limit of the number of answers you require, deselect other button');
    

    Like you have done in the insertQuestion function, getting the number of buttons pressed by using the length of the jQuery object.

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

Sidebar

Related Questions

In this jsfiddle , please follow the steps below: 1: When you open fiddle
To see the problems, please follow these steps (I am coding in C#): Put
Can you please tell me the steps I need to follow in order to
I have a problem with my application which is here . Please follow steps
I have a problem with my application which is here . Please follow steps
Please check the codes.. $(.editable).live(click,function(){ CurrentOBJhtml = $(this).text(); nextHtml = <input type='text' class='hoverable' value='+CurrentOBJhtml+'
Please note, sarnold has heavily edited the question; the original question, in its entirety,
As a follow up to this question I am trying to circumvent the list
one of my application i need facebook integration. please help me what the steps
This is a follow up to this question , where I didn't get any

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.