Header de una tabla estaticos
Publicado por Pablo Pinedo (5 intervenciones) el 04/12/2015 00:11:49
Saludos Amigos Programadores
Necesito saber como poder poner fija la fila donde estan los nombres de los campos de una tabla de consulta
+--------------+------------------------+--------------------------+
|codigo | Nombre | Apellido | --------> Fila Fija
*--------------+------------------------+---------------------------+
|001 | Juan | Perez |
+-------------+-------------------------+--------------------------+
|002 | Carlos | Rodriguez |
+-------------+------------------------+---------------------------+
he intentado varios ejemplos pero ninguno me funciona por favor agradecere me puedan dar la mano.
copio aqui mi codigo. y les agradesco desde ya su apoyo.
Necesito saber como poder poner fija la fila donde estan los nombres de los campos de una tabla de consulta
+--------------+------------------------+--------------------------+
|codigo | Nombre | Apellido | --------> Fila Fija
*--------------+------------------------+---------------------------+
|001 | Juan | Perez |
+-------------+-------------------------+--------------------------+
|002 | Carlos | Rodriguez |
+-------------+------------------------+---------------------------+
he intentado varios ejemplos pero ninguno me funciona por favor agradecere me puedan dar la mano.
copio aqui mi codigo. y les agradesco desde ya su apoyo.
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?php
session_start();
error_reporting(E_ALL ^ E_NOTICE);
include "kint/Kint.class.php";
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
$cod = "";
if (isset($_GET['cod'])) {
$cod = $_GET['cod'];
}
$desc = "";
if (isset($_GET['desc'])) {
$desc = $_GET['desc'];
}
$cate = "";
if (isset($_GET['cate'])) {
$fam = $_GET['cate'];
}
?>
<html>
<head>
<title>..::IAM : CIE-10::..</title>
<link rel="stylesheet" media="screen" href="css/normalize.css" />
<link rel="stylesheet" media="screen" href="test.css" />
<link rel="stylesheet" type="text/css" href="css/autocomplete.css" />
<link rel="stylesheet" type="text/css" href="css/estatico.css" />
<link rel="stylesheet" type="text/css" media="screen" href="jqgrid/css/ui.jqgrid.css" />
<!-- Archivos javascript -->
<script src="jqgrid/js/jquery.min.js" type="text/javascript"></script>
<script src="jqgrid/js/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript">
var tableOffset = $("#table-1").offset().top;
var $header = $("#table-1 > thead").clone();
var $fixedHeader = $("#header-fixed").append($header);
$(window).bind("scroll", function() {
var offset = $(this).scrollTop();
if (offset >= tableOffset && $fixedHeader.is(":hidden")) {
$fixedHeader.show();
}
else if (offset < tableOffset) {
$fixedHeader.hide();
}
});
$().ready(function () {
$('#txtDesc').autocomplete('cieDescAuto.php', {
width: 500,
matchContains: true,
selectFirst: false
});
$('#txtCod').autocomplete('cieCodAuto.php', {
width: 620,
matchContains: true,
selectFirst: false
});
$('#txtCat').autocomplete('cieCatAuto.php', {
width: 620,
matchContains: true,
selectFirst: false
});
});
</script>
<script type="text/javascript">
function expRegularNum(e)
{
var tecla;
tecla = (document.all) ? e.keyCode : e.which;
if (tecla == 8)
{
return true;
}
if (tecla == 13)
{
document.getElementById('btnsub').click();
return false;
}
var patron;
patron = /[0-9]/
var te;
te = String.fromCharCode(tecla);
return patron.test(te);
}
function expRegularCar(e)
{
var tecla;
tecla = (document.all) ? e.keyCode : e.which;
if (tecla == 8)
{
return true;
}
var patron;
patron = /[A-Za-z��\s]/
var te;
te = String.fromCharCode(tecla);
return patron.test(te);
}
function limpiar(x) {
document.getElementById('txtCod').value = "";
document.getElementById('txtDesc').value = "";
document.getElementById('txtCat').value = "";
frmSegus.submit();
}
</script>
</head>
<body>
<div id='header'>
<div class='left'align="left">
<h1>CIE-10</h1>
<h2>Información de Apoyo para Médicos</h2>
</div>
<div class='right' align="right">
<img id='logo' src='img/logo clinica internacional.gif' alt='Logo Clinica Internacional'/>
</div>
</div>
<div id="menu" style="margin-top:75px;">
<table width="100%">
<tr>
<td width='10%'><a href='index.php'><img src='img/segus.png' >Segus</a></td>
<td width='10%'><a href='indexCie10.php'><img src='img/cie10.png'>CIE-10</a></td>
<td width='10%'><a href='indexPetitorio.php'><img src='img/petitorio.png'>Petitorio</a></td>
<td width='10%'><a href='indexLasa.php'><img src='img/lasa.png'>LASA</a></td>
<td width='10%'><a href='indexaltoriesgo.php'><img src='img/altoriesgo.png'>Alto Riesgo</a></td>
</tr>
</table>
</div>
<div style="width:90%; margin:0 auto;" align="center">
<form id='frmSegus' name='frmSegus' method='post' action='xCie10.php'>
<input type='text' id='txtCod' name='txtCod' value='<?php echo $cod; ?>' placeholder='código' onkeypress='javascript:return expRegularNum(event);'/>
<input type='text' id='txtDesc' name='txtDesc' value='<?php echo $desc; ?>' placeholder='descripción'/>
<input type='text' id='txtCat' name='txtCat' value='<?php echo $cate; ?>' placeholder='categoría'/>
<input type='submit' id='btnSub' name='btnSub' value=''/>
<a href="javascript:limpiar();" style="color:#403D3D;">Limpiar</a>
</form>
</div>
<?php
require("conexion.php");
$vQuery01= "select codigo, diagnostico, categoria from cie10 where codigo is not null ";
if ($_SESSION['desc'] != ""){
$vQuery01 .= "and upper(diagnostico) like upper('%".$_SESSION['desc']."%') ";
};
if ($_SESSION['cod'] != ""){
$vQuery01 .= "and codigo like upper('%".$_SESSION['cod']."%') ";
};
if ($_SESSION['cate'] != ""){
$vQuery01 .= "and upper(categoria) like upper('%".$_SESSION['cate']."%') ";
};
$stid = oci_parse($conn,$vQuery01);
oci_execute($stid);
?>
<div id="Contenido-Segus">
<table width='90%' border='1px' align='right'>
<tr>
<thead>
<th>Codigo</th>
<th>Diagnostico</th>
<th>Categoria</th>
</thead>
<tbody>
<?php
while (($linea=oci_fetch_array($stid, OCI_ASSOC))!=false){
/* print_r($linea); */
echo '<tr>
<td>'.$linea["CODIGO"].'</td>
<td>'.$linea["DIAGNOSTICO"].'</td>
<td>'.$linea["CATEGORIA"].'</td>
</tr>';
};
?>
</tr>
</table>
</div>
<div id="firma" style="top-margin:140px; font-size:8px;">Elaborado por:</div>
<div id="firma" style="font-size:8px;">Gerencia de Sistemas</div>
<div id="firma" style="font-size:8px;">Mayo - Diciembre 2015</div>
</body>
</html>
Valora esta pregunta


0