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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:15:20+00:00 2026-05-13T15:15:20+00:00

I would like to refresh the #calendar div with the new content sent to

  • 0

I would like to refresh the #calendar div with the new content sent to calendar.php
I’m getting a success alert, but the content isn’t refreshing. How do I get the new calendar.php to show up with the POSTed data?

$(document).ready(function(){
 $('#next').click(function() {
  $.ajax({
       type: "POST",
       url: "calendar.php",
       data: 'year=2012',
       target: '#calendar',
       success: function(html){
          alert("Success");

       }
     });
   });

The relevant HTML code is here:
#next is the id on a div tag in calendar.php

<div id="calendar">
    <?php include('calendar.php'); ?>
</div><!-- /#calendar -->
  • 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-13T15:15:21+00:00Added an answer on May 13, 2026 at 3:15 pm

    You could just set it explicitly in your handler:

    success : function (html) {
        $('#calendar').html(html);
    }
    

    Also, since you’ll be replacing the contents of the calendar div (which contains the #next link), you’ll probably need to use .live('click', function() { instead of .click(function(), since you’ll lose the event handlers.

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

Sidebar

Related Questions

Environment : PHP/MySQL/Jquery I would like to refresh the page (ex: index.php) when new
This is quite complicated but i would like to be able to refresh a
I have a div that I would like to refresh on page load then
I would like to use jQuery to refresh a partial on a page, but
I would like to replace a content of <div id=container></div> after the ajax function
I have an iframe which I would like to refresh every fifteen seconds, but
I have a page where I would like it to remain static after refresh
Would like to know how to hide an div after a set of css3
I am working on a website, and I would like to refresh a portion
I would like to know that On Page refresh I would like to display

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.