bonjour,
je veux afficher une image dans une popu_up et audessous de cette image la description
tous ces champs sont ds une table ARTICLE.
vous pouvez voir la fonction : ouvre_popu_up1 que j'utilise dans mon code.
le traitement consiste en:
je parcours la table article et j'affiche 20 articles par page.
j'affiche : imagemini,reference,description,prix,imagegrand et numero du lot
quand je clique sur l'image ( imagemini) j'ouvre la pop_up et j'affiche
dans cet pop_up imagegrand(function : ouvre_pop_up1) mais le probleme je veux ecrire la description de cette image qui est un champs aussi dans la table article juste audessous de cette image.
J'ai essaye mais ca marche pas.
voici une partie de mon code:
<% Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-store"
if Request("page")="" then
Page=1
else
Page=Request("Page")
end if
set MaConn=Server.CreateObject("ADODB.Connection")
set rstAff=Server.CreateObject("ADODB.Recordset")
MaConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("antique.mdb") & ";Persist Security Info=False"
if not trim(Request("rechercheLot")) = "" then
reqLot = " AND article.numlot like '" & trim(Request("rechercheLot")) & "%' "
else
reqLot = ""
end if
affichageProduit = "SELECT imagemini,reference,description,prix,numlot,imagegrand FROM ARTICLE"
rstAff.Open affichageProduit,MaConn,1,1
if not rstAff.EOF then
rstAff.PageSize=5
rstAff.AbsolutePage=Page
end if %>
<head>
.....
</head>
<script language="JavaScript">
function ouvre_pop_up1(p) {
fenetre = window.open(p,"titre","toolbar=0, location=0,directories=0,status=0,scrollbars=1,resizable=0, copyhistory=0, menuBar=1, width=700,height=1000,LEFT=20,TOP=10");
fenetre.write("<img src ='<%=rstAff("imagegrand")%>'");
fenetre.document.write('<%=rstAff("description")%>');
}
</script>
<body link="#0066FF" vlink="#6633CC" bgcolor="#FFF0B2" style='margin:0'>
<table cellspacing="2" cellpadding="2" border="0" width="625" height="220">
<tr> <td colspan="4" align="center" height="24" width="496">
<h2><font color="#8080FF"> Catalogue </font></h2>
</td></tr>
<tr>
<th bgcolor="#FFFFCC" with="60" height="10"></th>
<th bgcolor="#CCFFFF" with="40" height="10"> Photo </th>
<th bgcolor="#CCFFFF" width="40" height="10"> Lot </th>
<th bgcolor="#CCFFFF" width="2400" height="10"> Description </th>
<th bgcolor="#CCFFFF" width="1400" height="10"> Estimation </th>
</tr>
<% dim i
i=0
DO WHILE NOT (rstAff.EOF or i=20) ' 20 article a afficher par page
%>
<tr>
<th bgcolor="#FFFFCC" with="60" height="10"></th>
<td bgcolor="#F2F2F2" width="40" height="20"><p align ="center">
<a href='javascript:ouvre_pop_up1("<%=rstAff("imagegrand")%>");'>
<IMG SRC ="<%=rstAff("imagemini")%>"</p></td>
<td bgcolor="#F2F2F2" width="40" height="20"><p align ="center"><%=rstAff("numlot")%></p></td>
<td bgcolor="#F2F2F2" width="2400" height="20"><p align="center"><%=rstAff("description")%></p></td>
<td bgcolor="#F2F2F2" width="1400" height="20"><p align="center"><%=rstAff("prix")%></p>
</td>
</tr>
<%
rstAff.MoveNext
i=i+1
loop
%>
</table>
</html>
<%MaConn.Close %>
</body>
</html>