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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:11:45+00:00 2026-06-14T09:11:45+00:00

How can refresh an html element when its value is changing. I mean assume

  • 0

How can refresh an html element when its value is changing. I mean assume that i have this tag:

<div id="response" style="display:none;"><div>

and i have this script:

<script type="text/javascript">
    $('#delete_link').click(function(e) {
        e.preventDefault();
        $('#result').html('').load('{% url messages_delete message.id %})
        alert($('#result').html());
        $('#'+$('#result').html()+'_list').trigger('click');
    });
</script>

when user clicks on delete_link, the server sends a value to response div, so response div which was empty before, now has a value, and i will use it’s value to know which tab i should trigger. when i use alert, it understands that the value of this tag is changed, and the trigger works. but without alert, it seems it doesn’t understand the value is changed and trigger doesn’t work. Is there a way to tell the program that the value is changed? i don’t want to use alert. thanks very much for your help

  • 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-14T09:11:46+00:00Added an answer on June 14, 2026 at 9:11 am

    .Load() is asynchronous, you need to set your content html in the load callback function.

     $('#delete_link').click(function(e) {
            e.preventDefault();
            $('#result').html('').load('{% url messages_delete message.id %}',function(){
               $('#'+$('#result').html()+'_list').trigger('click');
            });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have datagrid whichs items source is domainDataSource. How i can refresh Domain data
i can't seem to be able to refresh data that has already been loaded
Stripped down code shows that I can change an attribute, in this case data-split-icon,
I can't seem to find out why this is happening: I have an unordered
So, here's the deal. I have an html table that I want to populate.
In a html table I have in every row a cell with its own
I have an index.html file which looks like this (the rest is omitted), <ul
The click function works for the <li> element that is part of the HTML
I have the following HTML page: <div id=foobar> <?php echo $dynamicVar; ?> </div> <input
I want to change my background image of my html on every refresh. This

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.