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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:17:44+00:00 2026-05-31T01:17:44+00:00

I will preface my question by stating that I know it’s a strange request

  • 0

I will preface my question by stating that I know it’s a strange request but it cannot however be done otherwise for this particular project.

I have a list of a few hundred checkboxes as part of a form. Outside of the form, I have a link going to a separate page that I would like to append the list of checked checkboxes to. example:

<form name="sampleForm" method="POST" action="process.php">
    <input type="checkbox" name="checkbox_1" />
    <input type="checkbox" name="checkbox_2" />
    <input type="checkbox" name="checkbox_3" />
</form>

<a href="otherPage.php>Alternate Page</a>

What I need is for when someone clicks on the Alternate Page link, the checkboxes are appended like a GET statement:

otherpage.php?checkbox_1=1&checkbox_2=1

Or something along these lines, any suggestions that would solve a problem like this would be great. I am not interested in rewriting large portions of code or replacig this with a submit button.

  • 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-05-31T01:17:45+00:00Added an answer on May 31, 2026 at 1:17 am

    You can do it like this by attaching javascript to the link. Change the HTML to this:

    <a id="otherPageLink" href="otherPage.php>Alternate Page</a>
    

    Add this javascript:

    $("#otherPageLink").click(function() {
        var checkStr = [];
        $("form[name='sampleForm'] input[type='checkbox']").each(function() {
            checkStr.push(this.name + "=" + this.checked ? 1 : 0);
        });
        window.location = this.href + "?" + checkStr.join("&");
        return(false);
    });
    

    This works as follows:

    1. Attaches a click handler to the link.
    2. Gets all the checkboxes in that form
    3. Iterates through each checkbox, building a string for each one based on it’s value and putting them all into an array
    4. Get the original URL for the link and combine it with all the query parameters for the checkboxes and go to that URL
    5. return false to prevent normal processing of the link
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will preface this question with the disclaimer that I know there are many
Let me preface this question by stating that I'm not a C# developer. I'm
Let me preface this question with first stating that I'm new to GUI interfaces:
I will preface this question with the fact that I am extremely new to
I will preface this question by saying, I do not think it is solvable.
I'll preface this question by stating I have historically used tables for my HTML
I'll preface this question with the note that I have looked at this similar
To preface, I've seen the command to answer this question before, but now I
I will preface the question by saying that I am somewhat new to the
This is a C# winforms app. Preface: I am creating a form that will

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.