confirmation message for delete

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nagendra138
    New Member
    • Dec 2007
    • 5

    #1

    confirmation message for delete

    im developing web application in that i have a doubt


    how to display confirmation message


    thanks in advance........ .......
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by nagendra138
    im developing web application in that i have a doubt


    how to display confirmation message


    thanks in advance........ .......

    Use a javascript confirm box to ask the user if they want to delete

    Code:
     
    <script>
    function confirmDelete(delUrl) {
      if (confirm("Are you sure you want to delete"))
     {
    	// your code here
      }
    }
    </script>
    Call the function like this......
    Code:
    <a href="javascript:confirmDelete('delete.page?id=1')">Delete</a>
    Another way to do the same........... ........

    Code:
     
    <a href="delete.page?id=1" onclick="return confirm('Are you sure you want to delete?')">Delete</a>

    Comment

    Working...