no se puede visualizar un formulario
Publicado por Noe (186 intervenciones) el 30/03/2023 00:33:30
hola foro!!!
no se por que no se va hacia alta_prod2.php este es lo que tengo la busqueda funciona correctamente pero al darle clic al boton submit no responde. que estoy haciendo mal?
GRACIAS
no se por que no se va hacia alta_prod2.php este es lo que tengo la busqueda funciona correctamente pero al darle clic al boton submit no responde. que estoy haciendo mal?
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
<?php
include "inicio.php";
require_once("conecta.php");
?>
<script type="text/javascript" src="js/jquery-3.5.1.js"></script>
<script type="text/javascript">
$(function () {
$('#idp').focus();
document.getElementById('nuevo').disabled=true;
});
function TraeProducto(id){
$.post("busca_prod.php",{ClaveId:id},function(retorno){
registro = retorno.split("*");
if (registro[0] == "NoEncontrado"){
document.getElementById('nuevo').disabled=false;
$('#nom').focus();
}else{
alert('El producto ya esta registrado...');
$('input[type="text"]').val('');
$('#idp').focus();
}
});
}
function limpia(){
document.getElementById('nuevo').disabled=true;
$('input[type="text"]').val('');
$('input[type="number"]').val('');
$('textarea').val('');
$("#lis").val('Seleccione');
$('#idp').focus();
}
</script>
<div id="Formulario">
<div class="cuadro-negro">
<div class="cabecera">Registro de Producto</div>
<div class="cuadro-blanco">
<form name="frm" action="alta_prod2.php" method="post" autocomplete="off" enctype="multipart/form-data" />
<div>
Id Producto<br>
<input type="text" name="idp" id="idp" placeholder="Id producto..." class="campo largo1"
onchange="TraeProducto(this.value)" onkeyup="javascript:this.value=this.value.toUpperCase();" class="uppercase" />
</div>
<div>
Nombre<br>
<input name="nom" id="nom" class="campo largo2" type="text" placeholder="Nombre producto..." />
</div>
<div>
Descripcion<br>
<textarea name="des" id="des" class="campo largo2" rows="10" placeholder="Descripcion del producto..."></textarea>
</div>
<div>
Precio<br>
<input type="number" name="pre" id="pre" step="0.01" class="campo largo3" placeholder="Precio del producto..." />
Imagen
<input type="file" name="file01" />
</div>
<div>
Clave Producto
<select name="tip" id="sel" class="list">
<option>Seleccione</option>
<?php
$stmt = $pdo->query("SELECT clave,descripcion From des_producto");
While ($row = $stmt->fetch()){
?><option value="<?php echo $row['clave']; ?>"><?php echo $row['descripcion']; ?></option><?php
} ?>
</select>
</div>
<div class="sub">
<input type="submit" name="nuevo" id="nuevo" value="Guardar Producto" class="btn" />
<input type="button" name="clean" id="clean" value="Limpia Campos" class="btn" onclick="limpia()"/>
<input type="button" name="clean" id="clean" value="Menu Principal" class="btn" onclick="window.location.href='menu_admon.php'" />
</div>
</form>
</div>
</div>
</div>
<?php include "final.php";?>
Valora esta pregunta


0