@KK Sir,
I have the following code to display the posts from a single person on a monthly basis:
Code: Select all
<cms:archives masterpage="student.php" type="monthly">
    <cms:pages masterpage=k_user_template id=k_user_id limit='1' >
        <cms:reverse_related_pages 'created_by' masterpage="student.php" limit="1" start_on=k_archive_date stop_before=k_next_archive_date>
            <cms:date k_archive_date format="M Y" />
            <cms:show k_total_records />
            <a href="#!" data-toggle="modal" data-target="#getCodeModal">VIEW</a>
        </cms:reverse_related_pages>
    </cms:pages>
</cms:archives>


Now i want to display the daily count in a modal using AJAX. When "VIEW" (link, as in above code) is clicked, I want to be able to return the date wise entry count for the month that is clicked.

My Modal code is the standard bootstrap modal code. And my AJAX try is:
Code: Select all
$.ajax({
    type: "POST",
    url: "<cms:show k_site_link />daily-entries.php",
    data: {
   'dailyentry': "<cms:show dailyentry />"
    },
    success: function(resp){
   $("#getCode").html(resp);
    }
});


The daily-entries.php (used in url in AJAX) code stands as (which obviously doesnot work, for i have no idea how can i send the month clicked):
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:set dailyentry="<cms:gpc 'dailyentry' method='post' />" scope="global" />

<cms:archives masterpage="student.php" start_on="<cms:show dailyentry />" stop_before="<cms:show dailyentry />" type="daily">
    <cms:pages masterpage=k_user_template id=k_user_id limit='1' >
        <cms:reverse_related_pages 'created_by' masterpage="student.php" limit="1" start_on=k_archive_date stop_before=k_next_archive_date>
            <cms:date k_archive_date format="M d,Y" />::<cms:show k_total_records /><br>
        </cms:reverse_related_pages>
    </cms:pages>
</cms:archives>
<?php COUCH::invoke(); ?>


I am unable to do so. Can you please guide me?

Regards,
GenXCoders