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

  • Home
  • SEARCH
  • 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 8304351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:49:29+00:00 2026-06-08T17:49:29+00:00

Here is my code : <body> <div align=center> <b>A<input type=checkbox name=a id=check value=a></b> <b>B<input

  • 0

Here is my code :

<body>
<div align="center">
<b>A<input type="checkbox" name="a" id="check" value="a"></b>
<b>B<input type="checkbox" name="b" id="check" value="a"></b>
<b>B<input type="checkbox" name="c" id="check" value="c"></b>
<b>D<input type="checkbox" name="d" id="check" value="d"></b>
</div>
<table align="center">
<tr>
<td>Text:</td>
<td><input type="text" name="text" id="text"></td>
</tr>
</table>
</body>

I’m trying that: if (more than one) checkbox is selected (or checked) that value will be assigned into the checkbox like “abcd” or “acd” or “bd”.For that I have written jQuery

<script type="text/javascript">
$(document).click(function(){
if($("#check").attr('checked')){
    $("#text").val(("#check").val());
}
});
</script>

able to print one txtbox value at a time,but not able to put all checked value in the textbox at a time.
Where I am going wrong ??Any inputs will appreciated.

  • 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-08T17:49:31+00:00Added an answer on June 8, 2026 at 5:49 pm

    I may have not understood you correctly, but does this fiddle help you? http://jsfiddle.net/XwGJ9/1/

    The change is the javascript:

    var $textInput = $('#text');
    var $checkBox = $('#checkboxes');
    
    $('input').click(function(){
        populateTextInput();
    });
    
    function populateTextInput () {
        // empty text input
        $textInput.val('');
    
        // print out all checked inputs
        $checkBox.find('input:checked').each(function() {
            $textInput.val( $textInput.val() + $(this).val() );
        });
    }
    

    Edit: updated

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

Sidebar

Related Questions

Here is my code: <body onload=ccform.submit();> <form id=ccform name=ccform method=post action=https://www.XXXX.com runat=server> <input type=hidden
I am trying to log into facebook here is my code: <body> <form id=form1
So here's the code as I have it... <head> <style type=text/css> * { margin
here is the code: <html xmlns=http://www.w3.org/1999/xhtml> <head> <meta http-equiv=Content-Type content=text/html; charset=UTF-8 /> <title>jQuery UI
In the code below I added input button to the leftPane div. Here I
<html> <body> <form name=Upload enctype=multipart/form-data method=post> Filename: <INPUT type=file id=submit> <INPUT type=button id=send value=Upload>
Edit- here's the code <html> <head> <script type=text/javascript> var prodURL = https://blah; function postwith
Here is my code <body scroll=yes onload=checkWhileOnload(#{Bean.conLimit},'#{Bean.URL}');checkLoadStatus();hideLoader();> The problem i m facing is the
Here's the code: exports.index_post = function(req, res) { var nicks = []; if (req.body.nick)
Here is my code html> <head></head> <body> <?php $dir = 'folder/'; $files = scandir($dir);

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.