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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:18:38+00:00 2026-06-13T19:18:38+00:00

I have been trying to fix this issue for the past 2-3 hours but

  • 0

I have been trying to fix this issue for the past 2-3 hours but finally gave up. This is part of my javascript/jquery.

$(function() {  
    $('#ob').change(function() {
       var id = $("#ob").val();  
       var form_data = {
           id: id,
           OB: 3 
       };

       $.ajax({
           url: "changeinfo.php",
           type: 'POST',
           data: form_data,
           success: function(data) {
               $("#finfoob3").html(data);                             
           }
       });

       return false; 
   });
});  

The above successfully modifies a DIV element on change.

However in that DIV element, there was a button with id=obt3 which doesn’t work. Actually, it was overwriting it’s name to something else. I sent another POST value OB to the AJAX call and concatenate it with obt so that it becomes obt3. I then put the id of the button to obt3 but it still wouldn’t respond to a click event.

I tried to inspect the element with google chrome and the element’s id successfully changes to obt3 but wouldnt respond to it’s click event.

  • 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-13T19:18:39+00:00Added an answer on June 13, 2026 at 7:18 pm

    The problem is that when you replaced the contents of #finfoob3 you destroyed all the nodes that lived there, along with all their event handlers. There are two ways to handle this:

    • After replacing the div contents, re-create any event handlers you need.
    • Use Event Delegation to attach the event handlers to #finfoob3, so they won’t be destroyed when you change its contents.

    Since you are using jQuery, you should look at the .on() function. It gives you an easy way to define event delegation.

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

Sidebar

Related Questions

I have been trying to fix this issue for weeks but I'm at the
I have been trying desperately to fix this issue where my ListView items are
I have been trying to fix this problem for hours. My app keeps crashing
I have been trying to fix this for a while but I have had
So, I have been trying to fix this for about two months. It all
I really need some help with this as I have been trying to fix
I've been trying to fix this issue for a while, I've spent endless amounts
I have been trying to fix this script for more than an hour and
I've been trying to debug this issue for weeks now and I have made
I have been trying to fix my .setText crash issue, which occures when i

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.