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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:27:06+00:00 2026-06-15T22:27:06+00:00

I have a set of checkboxes (that currently do not do anything) on my

  • 0

I have a set of checkboxes (that currently do not do anything) on my homepage:

    <ul class="nav nav-list">
      <li class="nav-header">Questions</li>
      <li><label class="checkbox"> <input type="checkbox"> All </label></li>
      <li><label class="checkbox"> <input type="checkbox"> Funny </label></li>
      <li><label class="checkbox"> <input type="checkbox"> Popular </label></li>
      <li><label class="checkbox"> <input type="checkbox"> Helpful </label></li>
    </ul>

I wrote a simple back-end right now that supports URLs like: http://myhomepage.com?funny=1&popular=1 to show questions that are both funny AND popular, for example. There’s a query parameter for each option. The server checks the query parameters and returns an updated the @questions variable with the appropriate set. The view iterates through @questions and displayed them one by one.

Here’s my goal:
As the user selects checkboxes (e.g. funny and popular), I’d love to have the homepage make calls to the server (AJAX?) to update the set of questions displayed on the page to match the user’s selections (ideally with a spinner displayed as stuff is loading). I can use jQuery or just about anything else.

How would I go about doing this? For the back-end, I’m using Sinatra / Ruby, Bootstrap for the UI, and I can use jQuery or just about anything else you recommend 🙂

  • 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-06-15T22:27:07+00:00Added an answer on June 15, 2026 at 10:27 pm
    <html>
    <head>
    <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
    </head>
    <body>
    <ul class="nav nav-list">
          <li class="nav-header">Questions</li>
          <li><label class="checkbox"> <input type="checkbox"> All </label></li>
          <li><label class="checkbox"> <input type="checkbox"> Funny </label></li>
          <li><label class="checkbox"> <input type="checkbox"> Popular </label></li>
          <li><label class="checkbox"> <input type="checkbox"> Helpful </label></li>
        </ul>
    
        <div id="result"></div>
    
    <script>
    
    $(function(){
    var Url;
    $("input[type='checkbox']").click(function(){
        Url = 'http://myhomepage.com?';
        $.each($("input[type='checkbox']"),function(){
    
        if(this.checked)
        {
            var html = $.trim($(this).parent().html().replace('<input type="checkbox"> ',''));
            Url = Url + html + "=1&";
        }
    
        });
        console.log(Url);
        $.ajax({
          url: Url,
          success: function(data) {
            $('#result').html(data);
             alert('Load was performed.');
          }
        });
    
    });
    
    });
    </script>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of checkboxes that an Admin can tick to give users
I want to have a set of checkboxes that use AJAX to post to
I have an array of checkboxes that I edit at once to set up
I have a ListView that contains 3 checkboxes per row. I want to set
Currently i have a checkbox on my listview,from the BaseAdapter i have set the
I am currently needing to validate that a checkbox list is a required field
I have a set of checkboxes and have disabled few which I want to
I have a TreeGrid with selection appearence set to checkbox. TreeGrid resultGrid = new
I have a jTable with two columns.First column is set as Boolean(for checkbox) and
I have outline view each element of which is checkbox. I want to set

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.