Bonjour j'aurais besoin d'un petit coup de main.
voila j'ai une première fenêtre du type Html:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK rel=stylesheet type="text/css" href="include/opac.css">
<title>Microbib Opac - Fiche Document</title>
<link rel="shortcut icon" href="images/icobook.ico" />
<script type="text/javascript" src="include/prototype.js"> </script>
<script type="text/javascript" src="include/window.js"> </script>
<script type="text/javascript" src="include/debug.js"> </script>
<script type="text/javascript" src="include/securite.js"></script>
<script type="text/javascript">
<!--
var sesPlus = new Array("sestitres","sesauteurs","sonresume");
function init_msg()
{
for(var i=0; i<sesPlus.length; i++)
if(document.getElementById(sesPlus[i]).style.display == "block")
document.getElementById(sesPlus[i]).style.display = "none";
}
function toggle_msg(n)
{
init_msg();
var id=sesPlus[n];
document.getElementById(id).style.display = (document.getElementById(id).style.display == "none" ? "block" : "none");
}
function revenir()
{
if(LireCookie('affine') == 1) location.replace('affineliste.wco');
else if(LireCookie('affine') == 2) location.replace('trier.wco');
else location.replace(LireCookie('recherche'));
}
var support = '<%= detail.document%>';
var numero = '<%= detail.no_exemp %>';
//-->
</script>
</head>
<body onload="lanceTimeout();">
<div class="BIBLIOTHEQUES2">
<ul>
<li><a href="#" onClick="location.replace('opac.wco')"><img src="images_bibliotheque/logo_sfgu_mini.gif" alt="logo" width="177" height="99" align="middle"></a></li>
<li><h1>Le Catalogue Commun</h1></li>
<li><a href="#" onClick="location.replace('opac.wco')">>>Recherche Simple</a></li>
<li><a href="#" onClick="location.replace('opacext.wco')">>>Recherche Etendue</a></li>
<li><a href="#" onClick="location.replace('opac_theme.wco')">>>Recherche par Mot-Matière</a></li>
<li><a href="#" onClick="location.replace('nouveau.wco')">>>Nouveautés</a></li>
<li> <script language="JavaScript">
<!--
if(LireCookie(COOKIE_FONC_RESERV)==".T.")
document.write(espacelecteur());
//--></script>
<li> <script type="text/JavaScript">
<!--
if(estConnecte())
document.write(estconnecte()); ;
//--></script>
<li> <script language="JavaScript">
<!--
if('<%= multisite %>'==".F.")
document.write(reglements());
//--></script>
<li> <script language="JavaScript">
<!--
if(LireCookie(COOKIE_FONC_MULTISITE)==".T.")
document.write(multisite());
//--></script>
</ul>
</div>
<div class="MAIN">
<div class="FICHE">
<table width="100%">
</table>
<div class="ENTETE"><h2><%=detail.document+" N° "+detail.no_exemp%></h2></div>
<div class="CONTENU">
<table>
<tr>
<TD ROWSPAN="9" class="SUPPORT">
<center>
<%= IIF(!empty(detail.type_docum),"<img src='images/type/" + detail.type_docum + ".gif' valign='top'>","NR") %>
</center>
</TD>
<td valign="top" class="TITRE">Titre principal</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.titre %></td>
</tr>
<tr>
<tr>
<td valign="top" class="TITRE" >Sous-Titre</td>
<td valign="top" > </td>
<td class="VALEUR"><%= detail.soustitre %></td>
</tr>
<tr>
<td valign="top" class="TITRE">Autres Titres</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.autre_tit %></td>
</tr>
<tr>
<td valign="top" class="TITRE">Responsabilité</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.auteur %> <%= detail.fonction %></td>
</tr>
<tr>
<td valign="top" class="TITRE">Autres Responsabilités</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.autre_aut %></td>
</tr>
<tr>
<td valign="top" class="TITRE">Editeur/Date d'édition</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.editeur %> / <%= detail.annee_ed %></td>
</tr>
<tr>
<td valign="top" class="TITRE">Collection/Série</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.collection %> / <%= detail.serie %></td>
</tr>
<tr>
<td valign="top" class="TITRE">
<%= IIF((detail.type_docum="V"),"Copyright/Support/Collation",IIF((detail.type_docum="S"),"N°Distributeur/Support/Détails",IIF((detail.type_docum="E"),"ISBN/Support","ISBN/Nb pages/Format"))) %>
</td>
<td valign="top"> </td>
<td class="VALEUR">
<%= IIF((detail.type_docum="V"),detail.copyrigh + " / " + (IIF(detail.support="A","VHS",IIF(detail.support="B","DVD",IIF(detail.support="C","DivX",IIF(detail.support="U","Autre","NR"))))) + " / " + detail.version + " " + detail.couleur + " " + TRANSFORM(detail.duree) + "minutes",IIF((detail.type_docum="S"),detail.no_distr + " / " + (IIF(detail.support="A","CD Audio",IIF(detail.support="B","K7 Audio",IIF(detail.support="C","DVD Audio",IIF(detail.support="D","Disque vinyl",IIF(detail.support="U","Autre","NR")))))) + " / " + detail.depot_le + " " + detail.type_enr,IIF((detail.type_docum="E"),detail.isbn + " / " + (IIF(detail.support="A","CD-ROM",IIF(detail.support="B","Disquette",IIF(detail.support="C","DVD-ROM",IIF(detail.support="D","Fichier numérique",IIF(detail.support="E","Site Internet",IIF(detail.support="F","Autre",IIF(detail.support="G","Textes-références-périodiques","NR")))))))),detail.isbn +" / " + detail.nb_page + " / " + detail.dimensio))) %>
</td>
</tr>
<tr>
<td colspan="4" class="INTERLIGNE">Bibliothèque dépositaire de cet exemplaire : <%= detail.ville %></td>
</tr>
<TD ROWSPAN="7" class="SUPPORT">
<center>
<%= IIF(!empty(detail.code_lan),"<img src='images/langue/" + detail.code_lan + ".jpg' valign='top'>","NR") %>
</center>
</TD>
<tr>
<td valign="top" class="TITRE">Type de document</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.statut%></td>
</tr>
<tr>
<td valign="top" class="TITRE">Disponibilité</td>
<td valign="top"> </td>
<td class="VALEUR"><%= iif(empty(detail.dat_retpre),"Ce document est disponible","<b>Retour prévu le " + dtoc(detail.dat_retpre) + "</b>") %></td>
</tr>
<tr>
<td valign="top" class="TITRE">Genre/Public visé</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.genre %> / <%= detail.pub_vise %></td>
</tr>
<tr>
<td valign="top" class="TITRE">Localisation/Cote</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.localisati %>/ <%= detail.cote %></td>
</tr>
<tr>
<td valign="top" class="TITRE">Mot(s) matière</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.matiere %></td>
</tr>
<tr>
<td valign="top" class="TITRE">Résumé</td>
<td valign="top"> </td>
<td class="VALEUR"><%= detail.resume %></tr>
<tr>
<td height="1px" colspan="4" ><center>
<hr>
<script language="JavaScript">
if(LireCookie(COOKIE_FONC_RESERV)==".T.")
document.write(lienReservation());
</script>
</center>
</td>
</tr>
</table>
</div>
<div class="PIED"><a onClick="revenir()"><< Revenir en arrière</a> </div>
</div>
</div>
<div id="content" style="display:none" >
<strong><span style="font-size:16px"> Site où récuperer le livre</span></strong>
<SELECT NAME="site_depot">
<option value="1">premier
<option value="2">deuxieme
<option value="3">troisieme
<option value="5">quatrieme
</SELECT>
</div>
</body>
</html>
Ne vous souciez pas trop du contenu mais plutôt des dernières lignes elles font apparaitre une fenêtre Modal avec un menu a choix multiple.
Mon securite.js contient entre autre les infos suivante:
// Méthode site depot
function openDialog(id) {
Dialog.alert($(id).innerHTML, {className: "alphacube", width:300,
okLabel:"Ok",ok: reserver(),
})
EcrireCookie(COOKIE_SITE_DEPOT,$('site_depot').getInputs('text'));
}
Ma fenêtre apparait tout ce passe bien ,
mais voila mon dilemme j'aimerais récupérer dans un cookie "site_depot" le résultat choisi dans ma fenêtre modal ? comment faire ?
merci pour votre aide.