0
I’m having difficulty performing a function on a scheduling system,
I need to do the following, when the user selects a date the system makes a query in the database and fills in the check box. The consultation in the bank I can do, my problem is in creating a changue Event in the data field calling the query and filling the checkbox.
//
In the previous version of the system I did using Ajax, however I had a date select field and a time select field, so I used the script below, however the client requested the exchange for this table model.
<script type="text/javascript">
$(document).ready(function(){
$("select[name=predata]").change(function(){
$("select[name=prehora]").html('<option value="">Carregando...</option>');
$.post("ajax-prehora.php?predata=13/06/2016",
{predata:$(this).val()},
function(valor){
$("select[name=prehora]").html(valor);
}
)
})
})
It would not be better to use input with type datetime from Html5?
– Leonardo
Good afternoon friend my first version is this way and the client asked to be made something more visual, he wants that when a date is scheduled the table turns red, with the input was already running.
– Matheus Arruda