$(document).ready(function() { $('#form_log #mainfilter select').change(function(e){e.target.form.submit()}); }); function showSubmitedData(log_id) { alink=document.getElementById('show'+log_id); if (document.getElementById('logdata'+log_id)) { $('#logdata'+log_id).remove(); $(alink).html('Show Submitted Data').addClass('view_link').removeClass('del_link'); } else { $.post('log',{action:'detail', id:log_id}, function(data){ if (data.length>0) { currentRow=alink.parentNode.parentNode; tr=currentRow.parentNode.insertRow(currentRow.rowIndex+1); tr.id='logdata'+log_id; td=tr.insertCell(0); td.colSpan=currentRow.cells.length; innerTable=document.createElement('table'); td.appendChild(innerTable); innerTable.className='detailData'; innerTr=innerTable.insertRow(0); var data = eval('(' + data + ')'); for (type in data) { innerTd=innerTr.insertCell(0) cInnerHtml='