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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:06:47+00:00 2026-05-21T04:06:47+00:00

I want a html page to be called when I check a checkbox. I

  • 0

I want a html page to be called when I check a checkbox. I tried the following jQuery code, but it isn’t working. What is the mistake I have committed?

 <script type="text/javascript">
        $('#my_checkbox').change(function() {
        alert('Handler for .change() called.');
        $.get("equation_section.html");
        });
</script>

And this is my checkbox:

 <input class="checkbox" type="checkbox" name="my_checkbox" id="my_checkbox"/>

EDIT

 $('#my_checkbox').change(function() {
if ($('#my_checkbox').attr("checked") == true) {
    alert('Handler for .change() called.');
        $('#my_checkbox').addClass('jQlightbox');
            $.get('equation_section.html', function(data) {
                 $('.equation_section').html(data);
        });
    }
 });

This is my edited code. Now I get the alert box. And the page also gets loaded in the div. What if I want only the div content to be displayed upon the modal window and not the previous page content? Someone suggest me please.

  • 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-21T04:06:48+00:00Added an answer on May 21, 2026 at 4:06 am

    You are (probably) getting the page, but then doing nothing with it. Obviously, you should be looking at sample code from the jQuery.get() page

    Additionally, do you realize this will be called essentially every time the check box get clicked? If you want to load it the “equation_section.html” page into a div, you could do the following:

    In the page:

    <div id="equation_section"></div>
    

    Javascript:

    <script type="text/javascript">
    // on DOM load
    $(function () {
    
      $('#my_checkbox').change(function() {
        alert('Handler for .change() called.');
        $.get('equation_section.html', function(data) {
          $('#equation_section').html(data);
        });
      });
    
    });
    </script>
    

    If you are trying to redirect the user to the other page, you should do location.href = "equation_section.html";

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

Sidebar

Related Questions

I have an html page i want to print a portion of this html
I have an HTML page and I want to fetch the result between two
I have a HTML page with which I want to do some client side
i want to have an MP3 constantly playing and looping in an HTML page
I want to show three XMLs on a single html page. These XMLs have
i have a HTML page that want to encode it so could not decode
I have a page called android.html with a button with an id of detect.
I have a page called k.html which is in domain A. This page will
I am referencing JavaScript as follows on an HTML page: <script type=text/javascript src=http://code.jquery.com/jquery-1.6.1.min.js></script> <script
I have an html page with google maps in one of the divs called

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.