This is a migrated thread and some comments may be shown as answers.
Is it possible to recreate Javascript alert with Notification?
12 Answers 109 Views
This is a migrated thread and some comments may be shown as answers.
Alejandro
Top achievements
Rank 1
Alejandro asked on 13 Jul 2011, 10:21 PM
First of all I've gotta say that this control is awesome, thank you guys for delivering such useful stuff.

I'm wondering if there might be some way to replicate either javascript alert or radwindow radconfirm() functionality with this control, I mean, I want to block all background form until user click button inside the notification.

Any suggestions??

Kind regards.


Alex

12 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 14 Jul 2011, 03:48 PM
Hello Alex,

Thank you for the nice words :)

As for blocking the screen - this is not the intended purpose of this control and I'm afraid it isn't possible. The closest you could get would be to have a notification that would require the user to close it manually (AutoCloseDelay="0" KeepOnMouseOver="true" ShowCloseButton="true" ) and attach a handler to the OnClientClose event or the button click.

Please note that this is outside of the scope of this control, yet If more requests for a modal functionality arrive for the RadNotification we will create a public PITS item and if many votes are accumulated we will consider implementing this functionality.

All the best,
Marin
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Alejandro
Top achievements
Rank 1
answered on 14 Jul 2011, 04:06 PM
Marin.

Thanks for your quick response, I thought you'd say that so I'm trying to implement desired behavior by other ways.

I hope in the days to come for more users to request such functionality as I think may be very helpful to create custom notifications, confirmations, etc.

Thanks again.


Greetings from Mexico.



Alex
0
Colin
Top achievements
Rank 1
answered on 28 Sep 2011, 10:00 PM
I could really use modal functionality.
0
Steve
Top achievements
Rank 2
answered on 02 Oct 2011, 03:46 AM
+1 here too
0
Vijayaraj
Top achievements
Rank 1
answered on 05 Oct 2011, 08:49 PM
+1 here too

Regards,
Vijay
0
Marin Bratanov
Telerik team
answered on 07 Oct 2011, 02:10 PM
Hi guys,

Thank you for your feedback. We have logged this feature and we will consider implementing it for a future release, but I am sorry to say that for the time being this is not in our plans.

What you can do is create a simple div element with the desired color and opacity, then change its CSS display property in the OnClientShow and OnClientHide events of the RadNotification. A simple example is attached. Please note that the height and padding styles applied to the html, body and form elements. Their purpose is to make sure that the 100% size of the div covers the entire screen.

This has also been added in the Knowledge base in the following link: http://www.telerik.com/support/kb/aspnet-ajax/notification/how-to-make-a-modal-radnotification.aspx.


Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Vijayaraj
Top achievements
Rank 1
answered on 07 Oct 2011, 07:33 PM
Thanks, it works great.


Regards,
Vijay
0
Vijayaraj
Top achievements
Rank 1
answered on 07 Oct 2011, 08:17 PM
Hi,

This works really cool. 

I wish to use this as a confirmation dialog, is there a way to return values on which button is selected from the notification control?

Thanks in advance.

Regards,
Vijay 
0
Alejandro
Top achievements
Rank 1
answered on 07 Oct 2011, 08:22 PM
I accomplished that scenario by adding RadButtons to RadNotification Template, then I used OnButtonClicked Event and worked just fine.

Hope it helps.

Regards,

Alex
0
Vijayaraj
Top achievements
Rank 1
answered on 07 Oct 2011, 08:25 PM
Thanks Alex, even I did the same.
But I wanted to confirm if there is any other better way to do so.

Regards,
Vijay
0
SteveV
Top achievements
Rank 1
answered on 10 Dec 2011, 04:18 PM
The sample mostly does the trick but the overlay div doesn't cover all of the content, it only extends the hieght of the browser client area.  So when the browser window is scrolled vertically the overlay doesn't cover the scrolled area (see attached image).  I've tried a number of css workarounds to try to fix this but nothing made much of a difference. 

Any suggestions?

Thanks--Steve
0
SteveV
Top achievements
Rank 1
answered on 12 Dec 2011, 01:16 AM
Nevermind.  Embarassingly, my problem was a typo in my css.  Working fine now.

--Steve
Asked by
Alejandro
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Alejandro
Top achievements
Rank 1
Colin
Top achievements
Rank 1
Steve
Top achievements
Rank 2
Vijayaraj
Top achievements
Rank 1
SteveV
Top achievements
Rank 1
Share this question
or