Actually it does do something. It is a javascript error saying strExpenseItemID is undefined.
Which this may be where one of your main misunderstandings are.
ASP code is execute and stored on the web server, javascript runs in the user's browser.
You cannot have a .asp variable passed to a javascript function, because that variable is only "known" on the server.
You have to submit a form to a .asp page to process your delete (passing the strExpenseItemID via the form or a hidden control on the form).
You only want to use the javascript for validation. If you return a true or a false you can keep the form from being submitted and utilize this for your validation of the delete
In other words your form action should be set to ContractorExpenseEditDeleteItem.asp?EIID=<%=strExp enseItemID%>
Then your submit button should call your javascript and return true or false
I believe you will find the below code to work exactly as you expect
-
<script LANGUAGE="JavaScript">
-
<!--
-
function confirmDeleteLine()
-
{
-
var agree=confirm("Are you sure you want to delete this line of Expense?");
-
if (agree)
-
{
-
-
return true;
-
}
-
else
-
{
-
return false;
-
}
-
}
-
-
// -->
-
</script>
-
-
-
-
-
<form action="ContractorExpenseEditDeleteItem.asp?EIID=<%=strExpenseItemID%>" method="post">
-
<input type='submit' value='Delete' onClick='return confirmDeleteLine();'>
-
</form>
-