Confirm() always return true?
<script type="text/javascript">
    //Confirm Delete
    function confirms(id)

       var test=confirm("Confirm Delete?");

      if(test== true)
           window.location="<?php echo $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']; ?>&did="+id;
     else
        window.location="<?php echo $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']; ?>&did="+id;
    }
</script
Confirm() always return true?
===

<script type="text/javascript">
    //Confirm Delete
    function confirms(id)

       var test=confirm("Confirm Delete?");

      if(test== true)
           window.location="<?php echo $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']; ?>&did="+id;
     else
        window.location="<?php echo $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']; ?>&did="+id;
    }
</script