While in month view, I'm using jQuery to try to get the HTML that makes the table calendar, to pass it as a POST parameter using jQuery's .ajax() method (when a button is clicked):
$(document).ready(function() { $('#clickMe').click(function(){ var calendarTable = $('#calendar').html();
// for debugging alert("sending"); theCalendar = "<textarea rows='50' cols='70'>"; theCalendar += calendarTable; theCalendar += "</textarea>"; $('div#debugging1').html(theCalendar); var dataCalendarHTML = "calendarHTML=" + calendarTable $.ajax({ type : "POST", url : "process/processDefault_To_Excel.php", data : dataCalendarHTML, success: function(httpResponse) { // for debugging alert("AJAX returned:\n" + httpResponse); theHTML = "<textarea rows='50' cols='70'>"; theHTML += httpResponse; theHTML += "</textarea>"; $('div#debugging2').html(theHTML); } }); });
Using PHP, I want to be able to write it to a file, adding the and tags to make it a standalone HTML document (which I have no problem doing). The trouble is that the entire HTML contents in the tag, using
var calendarTable = $('#calendar').html();
is not being assigned to calendarTable. I only get the part of the table that holds the header month.
Any ideas?
Moretonel