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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:23:26+00:00 2026-06-06T05:23:26+00:00

I have this script set up that echoes all relevant users in a database

  • 0

I have this script set up that echoes all relevant users in a database to a page with check-boxes beside them. You can make a group out of these users in the database by checking some of the boxes and submitting the form. This all works great.

Unfortunately our designer doesn’t like this. What she wants is basically a list of six empty fields on the left of the screen. Then, when you click a plus button next to a person’s name on the right of the screen, that name appears in the first empty field…and so on with each subsequent plus button that’s clicked.

So instead of re-coding all this (it’s really not an option) I think I can just ‘re-style’ all this with jQuery. I can style the check-boxes so they look like a plus when they’re not selected and a minus when they are selected.

Then I just need to have some sort of event so that when when the check box is clicked, the person’s name is taken and inserted into the first empty box. It’s all just smoke and mirrors. The empty box could just be a div with a border. Functionally, it will all work the same as before.

Can anyone confirm if this is feasible? My JS knowledge sucks and I’m not sure where to begin. Plus I already have the following jQuery validator function on the page and I don’t want this new JS to interfere with it:

$(document).ready(function(){
$("#myform").validate({
    debug: false,
    rules: {
        group: {required: true}, 
    },
    messages: {
        group: {required: " Field required.", loginRegex: " Invalid character."},
    },
    submitHandler: function(form) {
        $('input[type=submit]').attr('disabled', 'disabled');
        $('#results').html('Loading...');
        $.post('process_group.php', $("#myform").serialize(), function(data) {
            $('#results').html(data);
        });
    }
    });
});

I suppose what I’m requesting is advice on how to code a check box to insert it’s value into some div when it’s checked. And to remove that value when it’s unchecked.

  • 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-06T05:23:28+00:00Added an answer on June 6, 2026 at 5:23 am

    If I understand you correctly, you need to do the following things with JQuery:

    1)Replace your checkboxes () generated by server side code with clickable +/- signs.

    You can do this by finding the checkboxes and replacing their default stage with an empty link that has a background image of a +.

    $('checkbox').remove().html('<a href="#" style="background-image:plusSign.png">Some Name</a>');

    Instead of an inline style you should make the plus and minus sign background images CSS classes if you know how.

    2)You want to change the + to a – when it is clicked, and 3) have the user’s name next to the + sign appear someplace else (in an empty input box?)

    To toggle the background image, just change the style (or class if you know how to make the image a CSS class) when clicked. Then take the contents and put it in your target element.

    This jsFiddle might help to illustrate what I’m describing above: http://jsfiddle.net/Ap2yW/1/

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

Sidebar

Related Questions

I have a php script that echoes a large JSON array. This is a
I have this sql script DECLARE @XmlStr XML SET @XmlStr = '<EmployeeID> <Employee>48f9194f-8d46-e111-8849-0050569445f1</Employee> <Employee>7d725561-8d46-e111-8849-0050569445f2</Employee>
I have set up a php script to receive url data like this: http://giffgaff.liamwli.co.uk/?name=liamwli
i have this script $content = string if(!isset($_GET['page'])){ $page = 1; } else{ $page
I have this script loaded on a page: (function() { window.alert('bookmarklet started'); function AjaxSuccess(data,
I have this script set up or rename my torrent folders, however it keeps
I have this script saved in test.vbs: Set FSO = CreateObject(Scripting.FileSystemObject) Set File =
I have this bash script here #!/bin/bash find /Users/ -name *.mov -o -name *.flv
I have this tiny script for now that checks if any change is made
I have this handy snippet [see below] that truncates a set of list items

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.