I have following code:
<body onload="LoadData()">
<table id="myTable">
</table>
</body>
And I have Javascript function like :
<script type="text/javascript">
function LoadData()
{
var sTempTableRow='<tr><td>cell-1 </td><td>cell-2 </td><td>cell-3 </td><td>cell-4 </td></tr>'
$('#myTable').append(sTempTableRow);
}
</script>
I have tried numerous times and at all the times face an exception like Microsoft JScript runtime error: Object expected.
Please tell me what is the problem here.