I have a table with the INCLUDE button containing the following code:
<td align="center"><input type="button" class="add" onclick="add_row(<?php echo($id_usuario); ?>, 0);" value="INCLUIR"></td>
The table.js file contains the function add_row () with the following code:
function add_row(pid_usuario,pdia_da_semana)
{
var inicio=document.getElementById("inicio").value;
var fim=document.getElementById("fim").value;
window.alert('ENTROU');
//INCLUIR_REGISTRO(pid_usuario, pdia_da_semana, inicio, fim);
var table=document.getElementById("data_table");
var table_len=(table.rows.length)-1;
var row = table.insertRow(table_len).outerHTML="<tr id='row"+table_len+"'><td id='inicio_row"+table_len+"'>"+inicio+"</td><td id='fim_row"+table_len+"'>"+fim+"</td><td align='center'> <input type='button' value='EXCLUIR' class='delete' onclick='delete_row("+table_len+")'></td></tr>";
document.getElementById("inicio").value="";
document.getElementById("fim").value="";
}
Basically what I do with the include button is to add a new row to the table.
So I thought .. Since I'm adding the line because it does not include the record at this point. Home
Ai that comes with the lack of experience .. I have no idea how to do the INCLUIR_REGISTRO()
function.
Should any of the more experienced colleagues help me?