Dear All,

I have a problem with delete confirmation code in java script.

i m using this code:

<script LANGUAGE="JavaScript">

function confirmSubmit()
var agree=confirm("Are you sure you wish to continue?");
if (agree)
	return true ;
	return false ;


in Asp page on click of hyperlink tage message displays and on click of Cancel the next page is called where as in simple html file hyper tag code acts properly.

please suggest in this regars what i have to day and where i m making mistake

What about just doing something like: <a href="delete.asp" onclick="return confirm('Are you sure you wish to continue?')">Delete</a> Or, if you need a function for several links:

<script type="text/javascript">
function confirmSubmit(){
return confirm('Are you sure you wish to continue?');
<a href="delete.asp" onclick="return confirmSubmit();">Delete</a>

Try like this:

<script language="JavaScript" type="text/javascript">
var d = document.form1;						
	function del(x)
						if(confirm("You want to delete this record"))