Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Langages serveur > ASP
ASP Forum sur la programmation ASP. Avant de poster : Cours ASP, FAQ ASP
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 28/06/2006, 08h46   #1
Membre du Club
 
Inscription : avril 2006
Messages : 301
Détails du profil
Informations personnelles :
Âge : 27

Informations forums :
Inscription : avril 2006
Messages : 301
Points : 47
Points : 47
Par défaut tableau en asp

Voici mon code qui affiche un tableau grâce à une procédure stockée :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
...
else
	Response.Write "<tr class=app><td><a href=default.asp?in=intitule&champ=" & champ & " >Intitulé</td><td>Id_source</td><td>Numéro de parution</td><td><a href=default.asp?par=parution&champ=" & champ & ">Date de parution</td><td>FTP Centre de scan + Heure</td><td><a href=default.asp?imp=import&champ=" & champ & ">Importé</a></td><td>Batch</td><td>Moteur</td><td>Clip JPM nombre de zip</td><td>chargement lecteur</td><td><a href=default.asp?lec=lecteur&champ=" & champ & ">Traité lecteur</a></td><td>Articles livrés</td><td>Alim site web</td></tr>"
 
...
do while not rs1.EOF 
				if rs1("nb_zip") <> rs1("nb_zip_lecteur") and compte_nbr_article(rs1("id_source"),rs1("numero_parution")) <> 0 then
				color="sessfin3"
				else
				color="sessfin2"
				end if
				Response.Write "<tr><td>" & rs1("intitule") & "</td><td>" & rs1("id_source") & "</td><td>" & rs1("numero_parution") & "</td><td>" & rs1("date_parution") & "</td><td></td><td> OK </td><td></td><td></td><td>" & rs1("nb_zip")& "</td><td class=" & color & ">" & rs1("nb_zip_lecteur") & "</td><td>" & compte_nbr_article(rs1("id_source"),rs1("numero_parution")) & "</td><td><a href=page.asp?num=" & rs1("numero_parution") & "&date=" & rs1("date_parution") & "&id=" & rs1("id_source") & "&champ=" & champ & ">" & compte_nbr_mail(rs1("id_source"),rs1("numero_parution")) & "</a></td><td></td></tr>"
				rs1.movenext
			loop
Je voudrais que la ligne qui contient les intitulés des colonnes reste fixe lorsque je fais défiler le reste du tableau

Merci!
sissi25 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/06/2006, 09h23   #2
Membre éprouvé
 
Avatar de malbaladejo
 
Inscription : avril 2002
Messages : 377
Détails du profil
Informations personnelles :
Âge : 34
Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

Informations forums :
Inscription : avril 2002
Messages : 377
Points : 477
Points : 477
Il y a un truc qui marche sur Firefox mais pas sur IE.
je ne connais pas exactement la syntaxe mais ca doit ressembler a ca:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<table>
   <thead>
      <tr>
         <td></td>
         ....
      </tr>
    </thead>
    <tbody style="overflow:auto">
       <tr>
         <td></td>
         ....
      </tr>
      ....
     </tbody>
</table>
Sinon, il faut mettre les titres dans un tableau et les données dans un autre tableau. Ensuite tu inlcus le tableau de données dans un div avec une hauteur fixe est un overflow.
Pour que ca marche il faut fixer les largeurs des colonnes.
malbaladejo est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/06/2006, 09h36   #3
Expert Confirmé Sénior

 
Avatar de Immobilis
 
Inscription : mars 2004
Messages : 5 849
Détails du profil
Informations forums :
Inscription : mars 2004
Messages : 5 849
Points : 5 965
Points : 5 965
Pour IE:
http://www.developpez.net/forums/sho...ghlight=header
http://www.developpez.net/forums/sho...ghlight=header
A+
Immobilis est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/06/2006, 14h01   #4
Membre du Club
 
Inscription : avril 2006
Messages : 301
Détails du profil
Informations personnelles :
Âge : 27

Informations forums :
Inscription : avril 2006
Messages : 301
Points : 47
Points : 47
j'ai essayé un exemple en css que vous m'avez donné et je voudrais savoir pourquoi cela ne fonctionne pas

Code :
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
 
<style type="text/css">
div.tableContainer {
	clear: both;
	border: 1px solid #963;
	height: 285px;
	overflow: auto;
	width: 756px
}
 
html>body div.tableContainer {
	overflow: hidden;
	width: 756px
}
 
 
div.tableContainer table {
	float: left;
	width: 740px
}
 
 
html>body div.tableContainer table {
	width: 756px
}
 
 
thead.fixedHeader tr {
	position: relative
}
 
 
html>body thead.fixedHeader tr {
	display: block
}
thead.fixedHeader th {
		border-left: 1px solid #EB8;
	border-right: 1px solid #B74;
	border-top: 1px solid #EB8;
	font-weight: normal;
	padding: 4px 3px;
	text-align: left
}
 
 
thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited {
	color: #FFF;
	display: block;
	text-decoration: none;
	width: 100%
}
 
 
thead.fixedHeader a:hover {
	color: #FFF;
	display: block;
	text-decoration: underline;
	width: 100%
}
 
html>body tbody.scrollContent {
	display: block;
	height: 262px;
	overflow: auto;
	width: 100%
}
 
tbody.scrollContent td, tbody.scrollContent tr.normalRow td {
	background: #FFF;
	border-bottom: none;
	border-left: none;
	border-right: 1px solid #CCC;
	border-top: 1px solid #DDD;
	padding: 2px 3px 3px 4px
}
 
tbody.scrollContent tr.alternateRow td {
	background: #EEE;
	border-bottom: none;
	border-left: none;
	border-right: 1px solid #CCC;
	border-top: 1px solid #DDD;
	padding: 2px 3px 3px 4px
}
 
html>body thead.fixedHeader th {
	width: 200px
}
 
html>body thead.fixedHeader th + th {
	width: 240px
}
 
html>body thead.fixedHeader th + th + th {
	width: 316px
}
 
 
html>body tbody.scrollContent td {
	width: 200px
}
 
html>body tbody.scrollContent td + td {
	width: 240px
}
 
html>body tbody.scrollContent td + td + td {
	width: 300px
}
</style>
 
<div id="tableContainer" class="tableContainer">
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="scrollTable">
 
<%
'Connexion a la BDD
 
Response.Write "<thead class=fixedHeader><tr><th> ...</th> ... </thead>
 
'requete
 
do while not rs1.EOF 
Response.Write "<tbody class=scrollContent><tr ... </tbody>
loop
...
Le code fonctionne mais l'en tête bouge toujours
merci de votre aide
sissi25 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/07/2006, 08h28   #5
Membre du Club
 
Inscription : avril 2006
Messages : 301
Détails du profil
Informations personnelles :
Âge : 27

Informations forums :
Inscription : avril 2006
Messages : 301
Points : 47
Points : 47
personne n'a d'idées ?
sissi25 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/07/2006, 08h34   #6
Membre du Club
 
Inscription : avril 2006
Messages : 301
Détails du profil
Informations personnelles :
Âge : 27

Informations forums :
Inscription : avril 2006
Messages : 301
Points : 47
Points : 47
j'ai essayé de sortir le <thead> et le <tbody> du code asp mais cela donne toujours le même résultat

mon en-tête de tableau n'est toujours pas fixe
sissi25 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/07/2006, 08h44   #7
Membre du Club
 
Inscription : avril 2006
Messages : 301
Détails du profil
Informations personnelles :
Âge : 27

Informations forums :
Inscription : avril 2006
Messages : 301
Points : 47
Points : 47
personne ne veut m'aider ???????
sissi25 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 23h53.


 
 
 
 
Partenaires

Hébergement Web