|
Article relates to
|
RadWindow for ASP.NET AJAX
|
|
Created by
|
Svetlina, Telerik
|
HOW-TO: Implement RadConfirm with "Do not show again" option
SOLUTION:
Showing a confirmation box to the user every time before some action might be annoying for some users and thus a common solution is to provide a "Do not show again" option. RadConfirm does not provide this functionality as a built in feature but it could be easily customized to support this scenario by changing its template and adding some javascript which saves the user choice. This article shows how to achieve this with a javascript cookie and through the following steps:
1) Add a checkbox to the radconfirm template:
2) Add javascript to create, read and delete a cookie:
3) Check whether the cookie exists and it is valid and determine whether to show the confirm based on that:
This code is a sample to be used as a start point and you can refine it further in order to meet your particular needs or to reuse an existing cookie, etc.
A sample, fully runnable demo page is available in the attached archive.
Please
Sign In
to rate this article.