Redirect your page using confirm box (yes or no basis/ok or cancel basis) in java





Code
--------------------------------

<body>

<button value="deactivate" onclick=deletePost() />

<script>
function deletePost() 
{
    var ask = window.confirm("Are you sure you want to delete this post?");
    if (ask) 
    {
        window.alert("This post was successfully deleted.");
        window.location.href = "register.html";
    }
}
</script>

</body>
              
                                                                                               --Sandeep Kumar Mishra
---------------------------------------------------------------------------------------------------------------
#Redirecting to another page by using confirm box(Yes or know /ok or cancel) in jsp or  #html 
#Redirecting to another page by using Dialog box(Yes or know /ok or cancel) in html or jsp
#dialogbox , javascript dialogbox,java script popup,pop up

Comments

Popular posts from this blog

Java Interview Preparation (conceptual)

Git Commands With Output Log

Java 8 Function Interface