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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:44:51+00:00 2026-05-13T09:44:51+00:00

I’m using the load method to replace the contents of ONE div. $( ‘#ajax_tbody_result’

  • 0

I’m using the load method to replace the contents of ONE div.

$( '#ajax_tbody_result' ).html( ' ' ).load(url);

Now I’m wondering whether it is possible to call the url, get the return values, split them up and update TWO or more divs in my template.

Thus the solution would be to get some objects out of the returned django context, split it up and update the divs with the correct content. This is the returned context:

context = {
            'object_list' : contact_list_page,
            'headers': headers,
            'filter_by_classification_form': filter_by_classification_form,            
            'filter_by_address_form': filter_by_address_form,
            'filter_by_company_form': filter_by_company_form,
            'urlquerystring_previous_page' : urlquerystring_previous_page,
            'urlquerystring_next_page' : urlquerystring_next_page,
        } 

Edit: The solution:

Split up the html response of a jquery get request into its parts and update the corresponding parts in the .html. You can do it like this:

$.get(url, function(results){
      var table = $("table", results);
      var spans = $("span.step-links", results);

      //update the ajax_table_result with the return value
      $('#ajax_table_result').html(table);
      $('.step-links').html(spans);

    }, "html");

The results object is the django template rendered to .html. From this .html return I take the stuff that I need (the table and the span with the id step-links) and update the corresponding objects in my page.

  • 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-13T09:44:52+00:00Added an answer on May 13, 2026 at 9:44 am

    use

    $.get(url, [{key:value}], function(data){
        //data is the entired contents of going to that url.
        //split it up here and do your stuff
    
        $('#div1').html(piece1);
        $('#div2').html(piece2);
    });
    

    http://docs.jquery.com/Ajax/jQuery.get

    edit: looking more closely at your question, you will need to also create a django template for the view which you’re calling with url that will give all the information you want to the javascript function.

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

Sidebar

Related Questions

No related questions found

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.