Brian, I tried doing what you told me to do. But, I'm getting errors when I try to run it. It says 'Object expected.' It comes up where I declare my variable 'dlt'. I think I'm doing something wrong in the coding. Here is what I have:
in the aspx.
vb file:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cmdDelete.Attributes.Add("onclick", "ConfirmDelete();")
End Sub
aspx file:
<script>
function ConfirmDelete()
{
if (confirm("...") == false)
{
document.all["results"].value = "False";
}
else
{
document.all["results"].value = "True";
var dlt;
dlt = return confirm("Are you sure you want to delete? To delete, click \"OK.\"\n"
+ "Otherwise, click \"Cancel.\"");
}
}
function SubmitRoutine()
{
if (document.all["results"].value == "False")
{
return false;
}
else
{
return true;
}
}
</script>
</HEAD>
<form id="Form1" onsubmit="return SubmitRoutine();" method="post" runat="server">
<INPUT type="hidden" name="results" value="dlt">
**At the very bottom of my form near the end of the body:
<TR>
<TD><asp:button id="cmdDelete" runat="server" Width="120px" Text="Delete"></asp:button></TD>
</TR>
Can you please tell me what's wrong w/this? Thanks so much for what you've done.