Hi all i am having a strange problem with my javascript ajax script and what i am wanting to do is before the content gets submitted to the server to delete data from a database i want the user to confirm it if yes then it will be confirmed if not then it wont be.
this is my code
?>
<script type="application/javascript">
function term()
{
//show the confirmation box
var t=confirm('Are you sure you want to delete this account?');
}
</script>
<form method="post" action="">
<table>
<input type="hidden" name="usr" value="<?php echo $user; ?>"/>
<tr>
<th> <input type="submit" name="sus" value="Terminate User" onclick="term()" ></th>
</tr>
</table>
</form>
<?
What am i doing wrong??
My confirmation box doesnt show.
Thanks,William