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 )

Viewed 11887 time(s), 10 post(s) 11/11/2013 9:09:45 PMby arbh89
arbh89

arbh89

11/11/2013 9:09:45 PM
Hello,

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

Regards.
Angel Blandon
This content has not been rated yet. 
226 Reputation 21 Total posts
khorvat

khorvat

11/12/2013 12:16:07 PM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
arbh89

arbh89

11/12/2013 2:41:02 PM
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.
This content has not been rated yet. 
226 Reputation 21 Total posts
khorvat

khorvat

11/12/2013 3:08:49 PM
Can you please provide us with the screenshot so we can pin point the issue.

Thanks
This content has not been rated yet. 
15993 Reputation 2214 Total posts
arbh89

arbh89

11/12/2013 3:44:56 PM
This is an example. I am not logged in as administrator.

Regards.
This content has not been rated yet. 
226 Reputation 21 Total posts
khorvat

khorvat

11/12/2013 3:52:55 PM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
arbh89

arbh89

11/12/2013 4:06:23 PM
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.
This content has not been rated yet. 
226 Reputation 21 Total posts
khorvat

khorvat

11/12/2013 4:17:46 PM
Can you please try to apply the patch that I mentioned earlier, I think this should fix your issue.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
arbh89

arbh89

11/12/2013 5:03:59 PM
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.
This content has not been rated yet. 
226 Reputation 21 Total posts
khorvat

khorvat

11/13/2013 10:54:39 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts