-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
82 lines (69 loc) · 2.34 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<title>Search Data AJAX</title>
<script src="jquery-3.4.1.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<h1 class="text-center">PLATAFORMA DE CONTROL</h1>
<hr>
<div class="row text-center">
<div class="col"><input type="button" class="btn btn-info" value="CLIENTES" onclick="saludame(1);"></div>
<div class="col">
<input type="button" class="btn btn-info" value="EMPLEADOS" onclick="saludame(2);">
<br><br>
<input type="text" id="cuadro_buscar" class="form-control" onkeypress="mi_busqueda();">
</div>
<div class="col"><input type="button" class="btn btn-info" value="ADMINISTRADORES" onclick="saludame(3);"></div>
</div>
<hr>
<h2 class="text-center">LISTAS DETALLADAS</h2>
<div class="row justify-content-md-center">
<div class="col-md-8">
<!-- AQUI SE MOSTRARÁ LA TABLA CON LA DATA -->
<div id="mostrar_mensaje"></div>
</div>
</div>
</div>
<script>
function mi_busqueda() {
buscar = document.getElementById('cuadro_buscar').value;
var parametros = {
"mi_busqueda": buscar,
"accion": "4"
};
$.ajax({
data: parametros,
url: 'codigo_php.php',
type: 'POST',
beforesend: function() {
$('#mostrar_mensaje').html("Mensaje antes de Enviar");
},
success: function(mensaje) {
$('#mostrar_mensaje').html(mensaje);
}
});
}
function saludame(boton) {
accion = boton;
var parametros = {
"accion": accion
};
$.ajax({
data: parametros,
url: 'codigo_php.php',
type: 'POST',
beforesend: function() {
$('#mostrar_mensaje').html("Mensaje antes de Enviar");
},
success: function(mensaje) {
$('#mostrar_mensaje').html(mensaje);
}
});
}
</script>
</body>
</html>