Jump to content

refresh calendar without refreshing whole page


clausowitz

Recommended Posts

I have a calendar displayed in my index.php. When I click next month the whole page gets refreshed.

Is there a way that the calendar refreshes without doing the whole page?

 

 <?php if (isset($_SESSION['idx'])) {
    echo '<div class="container" style="font-size:15px; margin-bottom:5px;">
	<table width="97%" border="0">
          <tr>
            <td width="78%" ><div style="font-size:15px;"><strong>MAAC Calendar</strong></div></td>
            <td width="11%"><a href="calen.php"><img src="images/calendar.png" alt="Add or Edit events in the calendar" border="0" align="left" width="30" height="30" /></a></td></tr></table><p>';
		include_once "mijnkalender.php";
       echo ' </p>
      </div><br />';}
      ?>

 

The problem start I guess where the calendar sends variables when the page goes to the next month.

<?php if(!isset($_REQUEST['date'])){ 
   $date = mktime(0, 0, 0, date('m'),  date('d'),  date('Y')); 
} else { 
   $date = $_REQUEST['date']; 
} 

// Build Previous and Next Links 
$previous_link = "<a href=\"".$_SERVER['PHP_SELF']."?date="; 
if($month == 1){ 
   $previous_link .= mktime(0, 0, 0, 12, $day, ($year -1)); 
} else { 
   $previous_link .= mktime(0, 0, 0, ($month -1), $day, $year); 
} 
$previous_link .= "\"><< Prev</a>"; 

$next_link = "<a href=\"".$_SERVER['PHP_SELF']."?date="; 
if($month == 12){ 
   $next_link .= mktime(0, 0, 0, 1, $day, ($year + 1)); 
} else { 
   $next_link .= mktime(0, 0, 0, ($month +1), $day, $year); 
} 
$next_link .= "\">Next >></a>"; ?> 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.