Bonjour,
je dispose d'une page qui contient un formualire d'ajout d'utilisateurs.
J'ai besoin de gérer dans la même page les droits de l'utilisateur.
Pour cela j'ouvre une fenêtre pop up qui me permet de faire le choix d'une ressource (table) et d'octroyer des droits sur cette ressource.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <h1>{#ADD_USER#|upper}</h1> <form name="formuser" id="formuser" method="post" action="add_user.php" class="forms"> <div id="zone_data"> <table align="left"> {section name=droits show = $afficher_droits} <tr> <td width="45%" valign="top"><td> <td width="45%" valign="top">{include file="frame_droits.tpl"}<td> <td width="45%" valign="top">ghfgdhf2<td> </tr> {/section} <tr> <td> <label for="login">Identifiant :</label><br/> <input name="login" type="text" id="login" size="15" /> <td> </tr> <tr> <td> <label for="nom">Nom :</label><br/> <input name="nom" id="nom" type="text" size="20"/> </td> <td> <label for="prenom">Prénom :</label></br> <input name="prenom" id="prenom" type="text" size="30"/> </td> </tr> <tr> <td> <label for="service" >Service :</label><br/> <input type="text" id="service" name="service" size="30"> </td> <td> <label for="fonction">Fonction :</label><br/> <input name="fonction" id="fonction" type="text" size="30" /> </td> </tr> <tr> <td> <label for="phone">Numéro de téléphone :</label><br/> <input name="phone" id="phone" type="text" size="20" /> </td> <td> <label for="mail">Courriel :</label><br/> <input name="mail" id="mail" type="text" size="30" /> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <input name="droits" type="button" value="Attribuer droits" class="button" onclick="window.open('droits_utilisateur.php','','toolbar=no,status=no,width=450,height=250,left=500,top=300,scrollbars=yes,top=no,location=no,resize=yes,menubar=no')" /> <p class="buttons"> <input name="Submit" type="submit" value="Valider" class="button" /> <input name="cancel" type="button" value="Annuler" class="button" onclick="javascript:window.location.href='utilisateur.php';" /> </p> </td> </tr> </table> </diV </form>
L'opbjectif : je veux en fermant la fenêtre pop up, repartir à la fenêtre appelante, en mettant à jour les droits de l'utilisateur et en ayant toujours les informations auparavant saisies sur l'utilisateur malheureusement pour moi c'est toute la page qui est raffraichie.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <form name="droits" id="droits" method="GET" action="add_droits.php" class="forms"> <div id="popup_data"> <table> <tr> <td><label for="ressource"><span id="monlabel">Table :</span></label></td> <td colspan="3" > <select id="ressource" name="ressource" /> <option></option> {foreach from=$smarty_xml_file item=table}<option>{$table->nom}</option>{/foreach} </select> </td> </tr> <tr> <td><label for="consulter"><span id="monlabel">Consulter :</span></label></td> <td colspan="3"><input type="checkbox" name="consulter" id="consulter" size="20"></td> </tr> <tr> <td><label for="ajout"><span id="monlabel">Insertion :</span></label></td> <td colspan="3"><input type="checkbox" name="ajout" id="ajout" size="20" ></td> </tr> <tr> <td><label for="maj"><span id="monlabel">Mise à jour :</span></label></td> <td colspan="3"><input type="checkbox" name="maj" id="maj" size="20" ></td> </tr> <tr> <td><label for="suppress"><span id="monlabel">Suppression :</span></label></td> <td colspan="3"><input type="checkbox" name="suppress" id="suppress" size="20" ></td> </tr> </table> <input name="valider" type="submit" value="Valider" onclick="window.opener.location.reload()" class="button" /> <input name="annuler" type="button" value="Annuler" class="button" onclick="window.close()" /> </div> </form>
comment faire pour eviter le raffraichissement de toute la page ? j'ai pensé aux frames mais on me dit que c'est depassé.
Je vous remercie d'avance de me consacrer un peu de votre temps.
Partager