Ok so this is for school i do not want the answer i just need to be pointed in the right direction. i have been reading as much as i can to get this figured out but i am running out of time to get this done and i still have plenty of other work to do.
This is the error i get
uncaught TypeError object has no method 'getTime'
I cant figure out what is causing this. i have removed the line and the error moves to the next one down which is the getFullYear method. I am thinking i screwed something up big time but i just cant see it.
This is the error i get
uncaught TypeError object has no method 'getTime'
I cant figure out what is causing this. i have removed the line and the error moves to the next one down which is the getFullYear method. I am thinking i screwed something up big time but i just cant see it.
Code:
function yearly(calendarDay) { if (calendarDay == "") { calendarDay = currentTime.getday(); }else{ calendarDay = calendarDay; } var currentTime = calendarDay.getTime(); var thisYear = calendarDay.getFullYear(); document.write("<table id='yearly_table'><tr>"); document.write("<th id='yearly_title' colspan='4'>"); document.write(thisYear()); document.write("</th>"); document.write("</tr>"); var monthNum = -1; for (var i=1; i<3; i++){ document.write("<tr>"); for(var j=1; j<4; j++){ monthNum++; calendarDay.setDate(1); calendarDay.setmonth(monthNum); writeMonth(calendarDay, currentTime); } document.write("</tr>"); } document.write("</table>"); } function writeMonthCell(calendarDay, currentTime) { document.write("<td class='yearly_months'>"); writeMonth(calendarDay, currentTime); document.write("</td>"); }
Comment