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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:07:49+00:00 2026-06-10T19:07:49+00:00

i have HTML like below, <ul class=holder style=width: 512px;> <li id=pt_5uZqW99dmlgmiuCTJiPHDC9T9o2sfz0I rel=test1@gmail.com class=bit-box>test1@gmail.com<a href=#

  • 0

i have HTML like below,

<ul class="holder" style="width: 512px;">
    <li id="pt_5uZqW99dmlgmiuCTJiPHDC9T9o2sfz0I"
    rel="test1@gmail.com"
    class="bit-box">test1@gmail.com<a href="#" class="closebutton"></a>
    </li>
    <li id="pt_9O0pMJDhtNbRgU1vNM8He8Vh9zpJ1tcE" 
    rel="test2@gmail.com"
    class="bit-box">test2@gmail.com<a href="#" 
    class="closebutton"></a>
    </li>
    <li id="pt_U8JH5E9y5w4atm4CadEPvuu3wdh3WcBx" 
    rel="test3@gmail.com" 
    class="bit-box">test3@gmail.com<a href="#"
    class="closebutton"></a></li>
    <li id="Project_update_user_id_annoninput" 
     class="bit-input">
     <input type="text" autocomplete="off" size="0" class="maininput"></li>
    </ul>


<input id="removeuser" value="" />

I need to store the values of li’s in hidden input box when I click that li’s.
If I click first two li’s i need to store the values like,

<input id="removeuser" value="test1@gmail.com,test2@gmail.com" />

That is i need to append input values every time when i click li’s.

i used below one,

jQuery(document).ready(function(){                

       jQuery("a.closebutton").click(function(){

          jQuery("input#removeuser").val(jQuery.map(jQuery(this).parent().attr('rel')).join(","));

        });

    });

But it does not works.how can i do that?

  • 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-10T19:07:50+00:00Added an answer on June 10, 2026 at 7:07 pm

    http://jsfiddle.net/ySV6F/

    jQuery(document).ready(function(){                
       jQuery("a.closebutton").click(function(){
          jQuery("input#removeuser").val(jQuery("input#removeuser").val() + "," + jQuery(this).parent().attr('rel'));
          $(this).remove();
           return false;
        });
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have html structure like below: <div id=banner-menu-holder> <div> <div class=avalible> <div class=items-holder> <div>
I have HTML like this: <a href=# class=modalInput glow rel=#newsletter >Newsletter!</a> This opens a
I have html like so: <div class=foo> (<a href=forum.example.com>forum</a>) <p> Some html here.... </div>
I have a HTML document like below: <td> <div class="commentLink"> <a href="javascript:ShowBox()">Show</a> </div> <div
I have some HTML and CSS code like below <html> <head> <style type=text/css> img.normal
I have the HTML below <span class=post-labels> <a href=http://myblog.blogspot.com/search/label/jQuery%20Downloads>jQuery Donwloads</a> <a href=http://myblog.blogspot.com/search/label/jQuery>jQuery</a> <a href=http://myblog.blogspot.com/search/label/mootools>mootools</a>
I have this object below: I thought about putting the messages in html like
I have html like: <fieldset> <div> <ul> <li class=test> This paragraph contains a very
I have an HTML file (from Newegg) and their HTML is organized like below.
I have HTML Like Below. I have a table inside another table.Each TD in

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.