o href abaixo não chama a funcao changestatus()
Alguem poderia me ajudar…
<a href="#" onclick="changeRouteStatus(2);"> <?php echo 'Inicia Rota'; ?></a>
<a href="#" onclick="changeRouteStatus(3)"> <?php echo 'Pausa Rota'; ?></a>
<a href="#" onclick="changeRouteStatus(5)"> <?php echo 'Finaliza'; ?></a>
<a href="javascript:void(0);" class="icon" onclick="responsiveMenu()"><i class="fa fa-bars"></i></a>
</div>
<div id="map_canvas"></div>
<script>
var noSleep = new NoSleep();
var wakeLockEnabled = false;
var toggleEl = document.querySelector("#toggle");
toggleEl.addEventListener('click', function() {
if (!wakeLockEnabled) {
noSleep.enable(); // keep the screen on!
wakeLockEnabled = true;
toggleEl.innerHTML = "<?php echo 'Desabilita Wake Lock'; ?>";
//document.body.style.backgroundColor = "green";
} else {
noSleep.disable(); // let the screen turn off.
wakeLockEnabled = false;
toggleEl.innerHTML = "<?php echo 'Ativa Wake lock'; ?>";
//document.body.style.backgroundColor = "";
}
function changeRouteStatus(route_status_id) {
if ( route_status_id == 5 ){
var r = confirm("<?php echo {lang_confirm_end_route}; ?>");
if (r == true) {
$.post( “…/ajax_route_status/index.php”,
{ ajaxtp: “save”, route_id: routeId, route_status_id: route_status_id, user_id: userId, usr_login: userLogin })
.done(function(response,status){
return response;
});
}
}else{
$.post( “…/ajax_route_status/index.php”,
{ ajaxtp: “save”, route_id: routeId, route_status_id: route_status_id, user_id: userId, usr_login: userLogin })
.done(function(response,status){
return response;
});
}