I'm creating check box which creates new log using AJAX. It fills info and automatically presses button to "create' So far i created this, but it doesn't change hour value, what am I doing wrong?
$canEdit = getPermission('tasks', 'edit', $a['task_id']);
$canViewLog = getPermission('task_log', 'view', $a['task_id']);
if ($canEdit) {
$s .= ("
\t\t".'<a href="#">'
. "
\t\t\t".'<input type="checkbox" onclick="createlog()" alt="' . $AppUI->_('Check')
. '" border="0" width="12" height="12" />' . "
\t\t</a>");
}
$s .= "
\t</td>";
?>
<script type="text/javascript">
function createlog(){
$.ajax({
type:'POST',
url:'?m=tasks&a=view&tab=1&task_id=' . $a['task_id'] .'',
data: {url: $('task_log_hours').value(8)
})
}
</script>