0

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 ;
else
	return false ;
	
}

</script>

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

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by Shanti C
0

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?');
}
</script>
<a href="delete.asp" onclick="return confirmSubmit();">Delete</a>
0

Try like this:

<script language="JavaScript" type="text/javascript">
var d = document.form1;						
	function del(x)
	{
						if(confirm("You want to delete this record"))
					{
					d.submit();
					}
				
			return;
	}
        </script>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.