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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:06:37+00:00 2026-06-05T04:06:37+00:00

for getting selected check-box values i m using a j query which is run

  • 0

for getting selected check-box values i m using a j query which is run fine under chrome , Firefox but fails in IE. For certain reasons i gave same id for each check-box but use different names. for example

     <input id="LIV" name="<?php echo $value['desc']; ?>" type="checkbox" checked value="<?php echo $value['id']; ?>" /> <?php echo $value['desc']; ?>

       <a class="i-btn-2" onclick="addparameters('LIV');">Add</a>

On click of add button i call a function addparameter which is as follows

               function addparameters(id)
              {

                 var tempstr='#'+id+':checked';

                  $(tempstr).each(function(i)
                  {
                        val[i] = $('#'+id).val();
                        val1[i]=($(this).attr('name'));
                        str12=str12+val[i];
                    });
                 }

In IE if i selected more than one check-boxes it gives me only first check-box value.But in chrome it gives me all selected check-boxes values
What is wrong with my code. Please help me to run it on IE

  • 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-05T04:06:39+00:00Added an answer on June 5, 2026 at 4:06 am

    As Neal said – each checkbox must have different ID – even every element in Your HTML has to have different ID – ID is what it is supposed to be – an IDENTIFICATOR and the IDETIFICATOR uniquely describes one concrete item.

    Instead of ID You can use class or the same input name:

    function addparameters(name) {
        var selector = $('input[name="'+name+'"]:checked');
        $(selector).each(function(i){
            val[i] = $(this).val();
            val1[i] = name;
            str12 = str12+val[i];
        });
    }
    

    or

    function addparameters(class) {
        var selector = $('input.'+class+':checked');
        $(selector).each(function(i){
            val[i] = $(this).val();
            val1[i] = $(this).attr('name');
            str12 = str12+val[i];
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using treepanel with check box in our application.It seems like: var treepanel
This is my check-box and it's created dynamically by getting the value of the
There are 2 ways of getting selected Item of a list view. list.getAdapter().getItem(position); list.getItemAtPosition(position)
I tried Dim theme = rblTheme.Items(rblTheme.SelectedIndex).Value getting first value selected Dim theme = rblTheme.SelectedItem.Value
Im getting a -1 value when i try to get the selected item position
Hi guys I keep getting an error no image selected when I try and
I am not getting the value of all the checkboxes selected. It just gives
From the code below I am getting a cell value from the selected row
For some reason I am getting the error No database selected I have no
When changing the selected item in a ListBox, I'm getting a weird error where

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.