funcion para desabiltar campos y select
Publicado por Karolina (10 intervenciones) el 04/12/2019 01:05:21
Hola bendiciones. Si me pueden ayudar en esto. Estoy haciendo un formulario para insertar datos en mi bases de datos y estoy empleando una función para desabiltar campos y select, pero no logro obtener los valores de estos campos (TIPO_TARJETA, BANCO, REF, MONTO, NRO_APROBACION)
para almacenar en mi BD.
para almacenar en mi BD.
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
<script type="text/javascript">
function activar1(){
var primero=document.getElementById("text1").disabled= false;
var segundo=document.getElementById("text2").disabled= false;
var tercero=document.getElementById("BANCO").disabled= false;
var tercero=document.getElementById("TIPO_TARJETA").disabled= false;
var tercero=document.getElementById("REF").disabled= false;
var tercero=document.getElementById("MONTO").disabled= false;
var tercero=document.getElementById("NRO_APROBACION").disabled= false;
}
function activar2(){
var primero=document.getElementById("text1").disabled= true;
var segundo=document.getElementById("text2").disabled= false;
var tercero=document.getElementById("BANCO").disabled= true;
var tercero=document.getElementById("TIPO_TARJETA").disabled= true;
var tercero=document.getElementById("REF").disabled= true;
var tercero=document.getElementById("MONTO").disabled= true;
var tercero=document.getElementById("NRO_APROBACION").disabled= true;
}
function activar3(){
var primero=document.getElementById("text1").disabled= true;
var segundo=document.getElementById("text2").disabled= true;
var tercero=document.getElementById("BANCO").disabled= false;
var tercero=document.getElementById("TIPO_TARJETA").disabled= false;
var tercero=document.getElementById("REF").disabled= false;
var tercero=document.getElementById("MONTO").disabled= false;
var tercero=document.getElementById("NRO_APROBACION").disabled= false;
}</script>
<table align='center' class='table table-hover table-responsive table-bordered'>
<tr valign='baseline'>
<th class='textAligncenter'> <button type="button" name="uno" onclick="activar1()" class= 'btn-sm' ><label> Pago Mixto</label></button></th>
<td>
<select id="text1" disabled="disabled" class='form-control'>
<option size="60">Mixto</option>
</select> </td>
</table>
<table align='center' class='table table-hover table-responsive table-bordered'>
<th class='textAligncenter'> <button type="button" name="dos" onclick="activar2()" class= 'btn-sm'>
<label>Efectivo</label> </button></th>
<td><input type="text" id="text2" disabled="disabled" size="60" class='form-control' />
</table>
<table align='center' class='table table-hover table-responsive table-bordered'>
<th class='textAligncenter'> <button type="button" name="tres" onclick="activar3()" class= 'btn-sm'><label>Banco</label>
</button></th>
<th class='textAligncenter'>Tarjeta</th>
<th class='textAligncenter'>Referencia</th>
<th class='textAligncenter'>Monto (USD)</th>
<th class='textAligncenter'>Nro Aprobaci�n</th>
<tr valign='baseline'>
<td>
<select id="BANCO" disabled="disabled" class='form-control' >
<option value='0171'>BANCO ACTIVO BANCO COMERCIAL, C.A.</option>
<option value='0115'>BANCO EXTERIOR C.A.</option>
<option value='0190'>CITIBANK.</option>
<option value='0121'>CORP BANCA.</option>
<option value='0137'>SOFITASA</option>
</select>
<td> <select id="TIPO_TARJETA" disabled="disabled" class='form-control' >
<option >Maestro -Debito</option>
<option >Mastercad -Credito</option>
<option >Visa -Credito</option>
</select></td>
<td > <input type="text" id="REF" disabled="disabled" / class='form-control'></td>
<td ><input type="text" id="MONTO" disabled="disabled" / class='form-control'></td>
<td > <input type="text" id="NRO_APROBACION" disabled="disabled" class='form-control' /></td>
</table>
Valora esta pregunta


0