Okay I'm getting there, how would i combine the delnews javascript to the
jQuery statement?

[CODE]
<script language="JavaScript" type="text/javascript">
    function delnews(user_id, user_firstname){
        if (confirm("Are you sure you want to delete '" + user_firstname +
"'")) {
            window.location.href = 'test.php?delnews=' + user_id;
        }
    }
        $(document).ready(function() {
            $('.removeLink').bind('click', function(){
                if (confirm("Are you sure you want to delete ")) {
                    $(this).parent().fadeOut(1000, function() {
                        $(this).parents('tr').remove();
                        alert('DELETED FROM DB');
                    });
                }
                return false;
            });
        });
</script>

</head>
<body>


<table border="0" width="50%">
    <tr><td>personA  javascript:delnews('1','personA') Delete </td></tr>
<tr><td>test1  javascript:delnews('10','test1') Delete </td></tr>
</table>
[/CODE]
-- 
View this message in context: 
http://www.nabble.com/Confirm-Delete-from-DB-tp20789251s27240p20789251.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to