<link rel="STYLESHEET" type="text/css" href="styles/calendar.css">
<script language="JavaScript" src="javascript/simplecalendar.js" type="text/javascript"></script>
<script type = 'text/javascript'>
function insCell()
{
var x=document.getElementById('tr1').insertCell(1);
var y=document.getElementById('tr2').insertCell(1);
x.innerHTML= 'Day 1';
y.innerHTML='<input type = "text" name = "day"><img src="images/calendar.gif" name="imgCalendar" width="34" height="21" border="0" alt=""><a href="javascript: void(0);" onmouseover="if (timeoutId) clearTimeout(timeoutId);window.status='Show Calendar';return true;" onmouseout="if (timeoutDelay) calendarTimeout();window.status='';" onclick="g_Calendar.show(event,'frm.day',true,'yyyy-mm-dd'); return false;"></a> ';
}
</script>
<form id="form2" name="frm" method="post">
<table id = 'class'border='1' cellpadding='0' cellspacing='0'>
<tr id = "tr1">
<th>Day</th>
</tr>
<tr id = "tr2">
<td>
<input type="text" name="day" >
<a href="javascript: void(0);" onmouseover="if (timeoutId) clearTimeout(timeoutId);window.status='Show Calendar';return true;" onmouseout="if (timeoutDelay) calendarTimeout();window.status='';" onclick="g_Calendar.show(event,'frm.day',true,'yyyy-mm-dd'); return false;"><img src="images/calendar.gif" name="imgCalendar" width="34" height="21" border="0" alt=""></a>
</td>
<input type="button" onclick="insCell()" value="Insert cell">
</tr>
</form>
</table>
Hi all, i need help with the codes above. I added in calendar js into a insert new cell function. However, it don't seems to be working. There is no new inserting of cell when i click on the button. It seem like those codes in red is hindering the code to execute. Is there any way to append within the javascript? Please help me! Thanks alot!