2 replies
I do something similar, the client has the option of changing their mind when deleting an order. What I do is set the cursor to an hourglass and submit the form via JavaScript when ‘OK’ is clicked. When cancel is clicked I just make sure that the cursor is set back to ‘auto’. Note, that ‘thisForm’ is the form name and that the submit action can be modified by changing ‘document.thisForm.action’ to the next page. Hope this helps.
if(confirm('Are you sure that you want to cancel this order?')) {
document.body.style.cursor = 'wait';
document.thisForm.submit();
} else
document.body.style.cursor = 'auto';
write code like
//declear variable
var con;
con=confirm("What You Want To Do")
if(con==0)
{
alert("first option pressed")
}
else
{
alert("second option pressed")
}
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending