I want to make confirmation dialog before delete some data. But there are so many buttons appear like this:
This is my code:
<t:pagelink page="SUM01005e" context="[clientProduct.client.clientId, clientProduct.aggregator.aggregatorId, clientProduct.postpaidProduct.billerCode]" onclick="return deleteConfirmation(this, '${clientProduct.aggregator.name}','${clientProduct.postpaidProduct.billerCode}','${clientProduct.productName}');"><img src="/sbgss/images/delete.png"/></t:pagelink>
This is my jquery:
function deleteConfirmation(ele, agName, productCode, productNameBox){
$j("#agName").html(agName);
$j("#productCode").html(productCode);
$j("#productNameBox").html(productNameBox);
$j("#deleteConfirmation").dialog({
buttons:[
{
text: "OK",
"class": "button button-pill button-flat-primary button-tiny ui-state-focus",
click: function() {
window.location = $j(ele).attr("href");
}
},
{
text: "Cancel",
style: "margin-left:10px",
"class": "button button-pill button-flat-primary button-tiny ui-state-focus",
click: function() {
$j(this).dialog("close");
}
}
]
});
return false;
with this:
<div id="deleteConfirmation" title="Delete Ag Mapping - Confirmation" style="display:none">
<table>
<tr><td colspan="3">${message:areyousuretoremovethisdata}</td></tr>
<tr>
<td>Aggregator</td>
<td style="width:10px">:</td>
<td><span id="agName"></span></td>
</tr>
<tr>
<td>Product Code</td>
<td>:</td>
<td><span id="productCode"></span></td>
</tr>
<tr>
<td>Product Name</td>
<td>:</td>
<td><span id="productNameBox"></span></td>
</tr>
</table>
</div>
How to fix that? Everyone please help me, because this is urgent case.
Aucun commentaire:
Enregistrer un commentaire