Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var old_host;
- var old_type;
- var old_prio;
- // --- Meric d'ajouter plutôt un id
- $('.dns .col').on("click", function ()
- {
- // --- Merci d'ajouter plutôt un id plutôt qu'une class. Vous l'avez fait pour l'host mais pour le reste.
- old_host = $('#edit_host').html();
- old_type = $('#edit_type').html();
- old_prio = $('#edit_prio').html();
- });
- var new_host;
- var new_type;
- var new_prio;
- // --- Faut mettre l'ID du form
- $("form").submit(function (event)
- {
- // --- Merci d'ajouter plutôt un id plutôt qu'une class
- new_host = $('#edit_host').html();
- new_type = $('#edit_type').html();
- new_prio = $('#edit_prio').html();
- if (new_host != old_host && old_type != new_type && old_prio != new_type)
- {
- // --- Les champs sont bien différents
- $("span").text("Mise à jour réussie...").toggle(true);
- return;
- }
- // --- Pas de champ modifiés
- $('#lamerederomainelleestbonne').toggle(true);
- event.preventDefault();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement