sebelumnya javascript ini tidak ada masalah, dan suatu ketika saya menggunakan PC berbeda,kemudian saya temukan script ini tidak berjalan.
saya belum tau penyebabnya apa.
untuk solusinya saya menggunakan cara lain:
Script awal :
<script type="text/javascript">
function deletedata(id,clg_id)
{
var conf = confirm("Are You Sure To Delete ID " +clg_id+ "?");
if(conf==true)
{
window.location.href = "main.php?act=eq_clgform&id="+id+"&clg_id="+clg_id+"&proses=Delete";
}
return false;
}
</script>
<a href="#" value=deletedata" onClick="deletedata('<?php echo $id;?>','<?php echo $row->clg_id;?>')">Delete</a>
function deletedata(id,clg_id)
{
var conf = confirm("Are You Sure To Delete ID " +clg_id+ "?");
if(conf==true)
{
window.location.href = "main.php?act=eq_clgform&id="+id+"&clg_id="+clg_id+"&proses=Delete";
}
return false;
}
</script>
<a href="#" value=deletedata" onClick="deletedata('<?php echo $id;?>','<?php echo $row->clg_id;?>')">Delete</a>
Script diatas saya modif menjadi seperti berikut ini :
<script type="text/javascript">
function deletedata(id,clg_id)
{
var conf = confirm("Are You Sure To Delete ID " +clg_id+ "?");
if(conf==true)
{
window.location.href = "main.php?act=eq_clgform&id="+id+"&clg_id="+clg_id+"&proses=Delete";
}
return false;
}
</script>
<a href="#" value=deletedata" onClick="return deletedata('<?php echo $id;?>','<?php echo $row->clg_id;?>')">Delete</a>
Semoga bermanfaat.function deletedata(id,clg_id)
{
var conf = confirm("Are You Sure To Delete ID " +clg_id+ "?");
if(conf==true)
{
window.location.href = "main.php?act=eq_clgform&id="+id+"&clg_id="+clg_id+"&proses=Delete";
}
return false;
}
</script>
<a href="#" value=deletedata" onClick="return deletedata('<?php echo $id;?>','<?php echo $row->clg_id;?>')">Delete</a>
No comments:
Post a Comment