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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:38:59+00:00 2026-05-16T15:38:59+00:00

Can jquery-ajax reload a div WITH DYNAMIC CONTENTS. For example if i have a

  • 0

Can jquery-ajax reload a div WITH DYNAMIC CONTENTS. For example if i have a div that shows a list of documents updated by a user on a website with each doc having a delete hyperlink. I want a post request to be made to a servlet on click of delete and in success function of ajax i want to reload the list of documents again including the Delete link that can again have the ability to post data to the delete servet and so on …

I know how to use jQuery-ajax and i succeed till the point where my div reloads with the new doc list (after a doc being deleted). However this new list loaded by ajax has a problem. The delete link does not work anymore.

For those who have failed to understand please consider this example.
Suppose that initially i see this on the UI :

Delete       One.doc
Delete       Two.doc

Now, Delete is a link on click of which i do a POST to a servlet called DeleteServlet that deletes the doc. So if i clicked Delete of One.doc, it should get deleted. Then in success of ajax i reload the div that shows the list of docs. So now i see this on UI :

Delete       Two.doc

Fine, that works but now my Delete link does not work 🙁

I saw the code shown by view source and all seems good.

Below is my code for some referene :

a class="subm_it"onclick="filename='${item.path}';document.getElementById('test').submit()" href="#">Delete ..


$(function() {
     $("a.subm_it").click(function() {
     var dataString = 'filename='+ filename;
     dataString += '&&restype='+resType;
     dataString += '&&userid='+userid;
     $.ajax({
      type: "POST",
      url: "delete.do",
      data: dataString,
 success: function(data) {
$('div#editable').html(data); 
...
  • 1 1 Answer
  • 1 View
  • 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-16T15:39:00+00:00Added an answer on May 16, 2026 at 3:39 pm

    Use .live() instead of .click(): http://api.jquery.com/live/

    $('.clickme').live('click', function() {
      // Live handler called.
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a jquery ajax page that shows a list of youtube videos. I've
if so can show simple example, ex in jquery ajax.post
In jQuery is there a callback that can be used when an ajax request
I'm trying to reload the contents of div tag on button-click. I can do
Can someone please share a extremely simple version of JQuery Ajax with pagination??
Not sure what I'm doing wrong but I can't get my JQuery AJAX call
How can I submit jQuery form object (not ajax)? I try form.submit() and it
I've created a wrapper function for jQuery's $.ajax() method so I can pass different
JQuery - Can we capture both the p and div tags at a time
Possible Duplicate: jquery/ajax load new content when available i have a table named news

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.