Jump to content

How to append each error message


danjapro

Recommended Posts

We are getting back each error message, but it only outputs the last error message.

 

how can we append each error message to the DIV 

 

Here is the code that loops thru each error message

 

 

  
                    if(data.length > 0) {    
$.each(data, function(error_code, message ) {
if(errorCode == $.trim(message.error_code) && errorCode != -1 ){
error_message = message.message;
                           return false; 
}
    });
}
 

 

 

Here is the code that outputs the error message in a drop down. PLEASE ANY HELP

 

if(BoltNotify === true && multipleNotice === true){ 
      //var error_message += error_message; 
  var spanerrorgen = $('.error.message').contents().find('h4').html(error_message);
  var appenderrorgen = $('.error.message').contents().find('h4');
  $.each(data, function($fieldref) { 
$(spanerrorgen).append(spanerrorgen);
});
 VanillaReload.notify.showNotification(".error");                     
    }
 
Link to comment
https://forums.phpfreaks.com/topic/291281-how-to-append-each-error-message/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.