MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Disable Javascript error alert  (Mono Support )

12778 put(a) pogledan, 10 odgovor(a) 11.11.2013. 21:09:45Kreirao(la) arbh89
arbh89

arbh89

11.11.2013. 21:09:45
Hello,

I wanted to disable javascript alert, when an exception occurs in application i get a javascript notification.

Regards.
Angel Blandon
Ovaj sadržaj još nije ocijenjen. 
226 Reputacija 21 Ukupno objava
khorvat

khorvat

12.11.2013. 12:16:07
Hi,

please confirm that you are referring to JavaScript notification that you get while logged in as an Administrator ? If that is the case you can try to "hide" the AjaxErrorHandler by going to "~\Portal\MonoX\MasterPages\Main.master" and by wrapping the following line of code into a ASP.NET Panel that is hidden.

<monox:AjaxErrorHandler id="ajaxErrorHandler" runat="server"></monox:AjaxErrorHandler>
Regards
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
arbh89

arbh89

12.11.2013. 14:41:02
But notification error appears even if not logged in as administrator, before I redirected to the error page now only displays the notification in javascript alert.
Ovaj sadržaj još nije ocijenjen. 
226 Reputacija 21 Ukupno objava
khorvat

khorvat

12.11.2013. 15:08:49
Can you please provide us with the screenshot so we can pin point the issue.

Thanks
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
arbh89

arbh89

12.11.2013. 15:44:56
This is an example. I am not logged in as administrator.

Regards.
Ovaj sadržaj još nije ocijenjen. 
226 Reputacija 21 Ukupno objava
khorvat

khorvat

12.11.2013. 15:52:55
Can you please give us a bit more info:

- can you please send a wider screenshot
- can you let us know on what page do you get the exception
- do you have any JavaScript errors on that page

Thanks
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
arbh89

arbh89

12.11.2013. 16:06:23
I am getting the notification error in my custom page, i dont want javascript notification, i want to keep redirecting to error.aspx page.

I dont have any javascript error in my page. you can see it in attached image.

Regards.
Ovaj sadržaj još nije ocijenjen. 
226 Reputacija 21 Ukupno objava
khorvat

khorvat

12.11.2013. 16:17:46
Can you please try to apply the patch that I mentioned earlier, I think this should fix your issue.

Regards
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
arbh89

arbh89

12.11.2013. 17:03:59
One of this conditions is true
if (<%# (MonoSoftware.MonoX.Utilities.SecurityUtility.IsAdmin() || IsErrorAlertEnabled()).ToString().ToLower() %>)
using this condition i understand that ErrorAlert can be disable or not is possible?.

This line of code is from /MonoX/MasterPages/AjaxErrorHandler.ascx

Regards.
Ovaj sadržaj još nije ocijenjen. 
226 Reputacija 21 Ukupno objava
khorvat

khorvat

13.11.2013. 10:54:39
Yes, as you can see this condition requires of user to be an Administrator and that you have IsCustomErrorEnabled (Custom errors enabled).

So you can't change the behavior through some configuration you can just remove that user from admin mode or if you change that line of code you can disable behavior for all users.

Regards
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava