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
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test</title>
</head>
<body>
<link rel="stylesheet" href="../css/custome-theme/jquery-ui-1.7.3.custom.css" type="text/css" media="screen" />
<script type="text/javascript" src="../js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="../js/jquery-ui-1.7.3.custom.min.js"></script>
<script>
$('a.masuppression').live("click",function (event){
event.preventDefault();
var id = $(this).attr("href");
$("#dialog").dialog({
resizable: false,
height:180,
width:300,
modal: true,
autoOpen:false,
title: 'Supprimer ce personnage ?',
buttons: {
'Confirm': function() {
$(this).dialog('close');
$.ajax({
type:'get',
url: "test.php"+id,
success:function(e){}
});
return false;
},
Cancel: function() {
$(this).dialog('close');
}
}
});
});
</script>
<?php if(isset($_GET['id'])){ print("ID -> ".$_GET['id']);} ?>
<div id="dialog">
<p><span class="ui-icon ui-icon-alert">Attention</span> : Voulez vous supprimer cet element?</p>
</div>
<div class="rien">
<ul>
<li>Personnage 1 : Bob (<a class="masuppression" href="">supprimer</a>)</li>
<li>Personnage 2 : Bill (<a class="masuppression" href="">supprimer</a>)</li>
<li>Personnage 3 : Tom (<a class="masuppression" href="">supprimer</a>)</li>
<li>Personnage 4 : Mitch (<a class="masuppression" href="">supprimer</a>)</li>
</ul>
</div> |