javascript - Dialog Boxes and Controls implementation -


for now, i'm working on users managment page.

when admin chooses delete user, did create alert , confirmation popups sure actions done.

i have form, , 2 buttons

<td colspan="2"> <input type="submit" value="modifier" name="modifier" onclick="return sure()"> ou <input type="submit" value="supprimer" name="supprimer" onclick="return sure2()"> </td> 

and several js functions :

<script>   function sure(){       alert("l'utilisateur <?php echo $nom->nom ;?> <?php echo $prenom->prenom ;?> bien été modifié.");   }   function sure2(){      var result=confirm("etes-vous sur de vouloir supprimer <?php echo $nom->nom ;?> <?php echo $prenom->prenom ;?> ?")      if (result==true)      {           alert("suppression effectuée")                      close          window.open ("admin_modif_user.php") (to opened in same tab after closing deletion page)       }      else      {         return false;      }   }   </script> 

the thing want when admin click "no" (the return false) he's redirected on list showing users (a php page), , same when admin click on last ok aknowlege deletion.

hope understand question, surely can little confusing.

thanks in advance :)

you can use redirect user (if mean)

window.location.href = "an_other_page.php";  

Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -