This is my first post on these forums as we have only just started using the Telerik Controls. All I can say so far is... WOW. Such a brilliant array or tools on offer.
What I was wondering was whether it was possible to display a countdown to the notification display in minutes and seconds rather than just seconds. If so, how would you go about doing this?
8 Answers, 1 is accepted
Yes, it is possible to display a countdown to the notification display in minutes and seconds using RadNotification. Here is how to achieve the core functionality step by step.
- The ShowInterval property is set to automatically show the popup as time before session timeouts as you desire. This simple setting replaces using any timers at all.
- The Value property is set to the desired url of the page which shows when session expires. You could of course evaluate it on the client or send it through different techniques, even hard - code it, but this way is more elegant and the notification takes care of sending it to the client where you can easily extract it.
- Declare a handler for the OnCallbackUpdate event (it could be simply blank) and call the client method update() when you want to restart the session. This will automatically perform a callback to the server - codeless boost of performance.
- If the session should not be restarted, simply use the client get_value() method to extract the url and redirect to it.
Please have a look at the following to display a notification with count down timer to remind session expiry notification.
How can i show minutes with seconds like 55:00 > 55:45 > 00:35.
This is what I have been trying to do as well. Any body any ideas?
The two places are:
in the updateMainLabel() function - the line: mainLabel.innerHTML = secondsBeforeShow; - convert the seconds and pass that new string
in UpdateTimeLabel() - timeLbl.innerHTML = seconds--; - once again. Just create a function that will take the seconds as a parameter and will return a string.
Its working good but its not reset timer for every click event.
I need to reset timer for every click or select event in same page.