bonjour ,j'ai crée un tableau d'annuaire (grid) avec un boutton ajouter qui fait apparaitre un formulaire de saisi
voici mon code :
par ailleur jai crée un boutton pour s'authentifier
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 <div class="header form-area"> <div class="searcharea"> <div dojoType="dijit.form.TextBox" type="text" id="search" name="search"></div> </div> <div class="right-button"> <div dojoType="dijit.form.Button" onclick="dijit.byId('dialogAdd').show()">Ajouter</div> <div dojoType="dijit.form.Button" id="delete">Supprimer la séléction</div> </div> </div> <div dojoType="dojox.grid.DataGrid" jsId="grid" store="store" structure="layout" query="{}" rowSelector="20px"></div> <div class="footer form-area"> <div dojoType="dijit.form.Button" id="save" onclick="grid.store.save();">Sauvegarder les modifications</div> </div> <div dojoType="dijit.Dialog" id="dialogAdd" jsId="dialogAdd" title="Ajouter à l'annuaire"> <table> <tr> <td><label for="name">code</label></td> <td><input dojoType="dijit.form.ValidationTextBox" required="true" type="text" id="name" name="name"></td> </tr> <tr> <td><label for="firstname">designation</label></td> <td><input dojoType="dijit.form.ValidationTextBox" require="true" type="text" id="firstname" name="firstname"></td> </tr> <tr> <td><label for="phone">prix</label></td> <td><input dojoType="dijit.form.ValidationTextBox" require="true" type="text" id="phone" name="phone"></td> </tr> </table> <button dojoType="dijit.form.Button" type="submit" id="add" class="my-button">Enregistrer</button> </div>
*
avec comme code :
mes questions sont :
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 <div dojoType="dijit.form.Button" onclick="dijit.byId('dialogAdd2').show()">s'authentifier</div> <div dojoType="dijit.Dialog" id="dialogAdd2" jsId="dialogAdd2" title="espace authentification"> <table> <tr> <td><label for="name">login</label></td> <td><input dojoType="dijit.form.ValidationTextBox" required="true" type="text" id="login" name="login"></td> </tr> <tr> <td><label for="firstname">mot de passe</label></td> <td><input dojoType="dijit.form.ValidationTextBox" require="true" type="text" id="mdp" name="mdp"></td> </tr> </table> <button dojoType="dijit.form.Button" onclick="doAnimation(2);">s'authentifier</button> </div>
- comment faire disparaitre mon tableau(grid) ,lors du lancement de ma page html ,et afficher seulement mon boutton d'authentification ?(jai trouve la fct 'fadOut' mais j'ai pas su comment l'utiliser )
-afficher mon tableau depend de l'authentification ,en d'autres termes le grid ne sera affiché que lors d'un succés dauthentification ,sinon un message d'erreur s'affiche sur le dialog d'authentification meme ! comment implementer les tests d'authentification en se basant sur un fichier JSON ??
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 { identifier: 'name1', label: 'name1', items: [ { login:'ut1', mdp:'Alex'}, { login:'ut2', mdp:'country'} ]}
merci d'avance pour votre aide !
Partager