Skip to content Skip to sidebar Skip to footer

Javascript - Closing Confirmation Message If No Response From User

I have got asp.net 2.0 website, in which I display session timeout through confirm message box, asking user to select ok or cancel. Problem: if user doesn't provide any input (assu

Solution 1:

If you are using the native browser confirmation box you cannot dismiss that, the user would need to do so. If you create your own, then you can use setTimeout to dismiss after a certain amount of time

Solution 2:

As haslama suggested that you will have to create a custom alert as you can't dismiss the browser confirmation box.

As an alternative you can show a div based message to user instead of an alert, and in that div user can select OK or cancel and you can implement timeout for that div.

Post a Comment for "Javascript - Closing Confirmation Message If No Response From User"