Hello All,
I am having a confirmation box after clicking on the "Delete " link in the jsp. Now the problem is that the success deletion page is showing in the same window.
I would like to show it in a pop up window.
I tried to use the javascript onclick(), but it is not wotking. So, how can I do that?
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jconfirmaction.jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.ask-plain').click(function(e) {
e.preventDefault();
thisHref = $(this).attr('href');
if(confirm('Delete this record?')) {
window.location = thisHref;
}
});
$('.ask-custom').jConfirmAction({question : "Anda Yakin?", yesAnswer : "Ya", cancelAnswer : "Tidak"});
$('.ask').jConfirmAction();
});
</script>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=750,height=430,scrollbars=no');
return false;
}
//-->
</SCRIPT>
---Delete image
<td width="3%" align="left"><a href="cir_delete.jsp?cir_id=<%=rs.getString("cir_id")%>" class="ask"><IMG SRC="12.png" ALT="Delete" BORDER="0"></a></td>
Thanx