Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
TLove  
#1 Posted : Monday, December 29, 2014 5:23:33 AM(UTC)
TLove

Rank: Member

Groups: Member
Joined: 7/25/2007(UTC)
Posts: 17

Thanks: 3 times
Hello,

I am trying to figure out how I can suppress the default error message that is displayed in the information bar when there is a server-side error. I am using the error event handler to display the error message from the server but it isn't displayed until after the default error message is displayed. Below is the function I am using as my error handler.

Code:

function _handleUploadError(errorCode, httpResponseCode, errorPage /*, additionalInfo */) {
  var errorResponse = $.parseJSON(errorPage);
  $au.imageUploaderFlash('fileUploader').informationBar().show(errorResponse.description);
}


Thanks
-Tim
Andrew  
#2 Posted : Monday, December 29, 2014 11:14:57 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
It is not possible to suppress it at this moment, although the idea is great. I have put it on our todo list.

Meannwhile, you can do it by changing the text content of the span with informationBarText class name. Hopefully it is the only span with such class on your page. :-)

Code:
$(".informationBarText").text(errorResponse.description);


I know that it is not very beautiful hack but at least it works. You may want to change it after we add this feature though.
thanks 1 user thanked Andrew for this useful post.
TLove on 12/30/2014(UTC)
TLove  
#3 Posted : Tuesday, December 30, 2014 4:36:43 AM(UTC)
TLove

Rank: Member

Groups: Member
Joined: 7/25/2007(UTC)
Posts: 17

Thanks: 3 times
That will work, thank you.
-Tim
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.