EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: r2ferna on March 03, 2015, 04:48:31 PM



Title: How to display new lines in messager plugin?
Post by: r2ferna on March 03, 2015, 04:48:31 PM
When next code runs I would like to see 3 lines of text in the messager box.
But just I see the three text messages in 1 line.
Can you help me please?

Code:
 else {
        var errMsg = '';
        if (g_agenciaInvalida) { errMsg = errMsg + ((errMsg=='')?'':'\n') + 'Agencia Invalida!!!'; }
        if (g_empresaInvalida) { errMsg = errMsg + ((errMsg=='')?'':"\n") + 'Empresa Invalida!!!'; }
        if (g_grupoInvalido)   { errMsg = errMsg + ((errMsg=='')?'':'\r') + 'Grupo Invalido!!!'; }
        if (errMsg!='') { $.messager.alert('Error', errMsg, 'error'); }
        else { regresaDatos(); }
    }


Title: Re: How to display new lines in messager plugin?
Post by: stworthy on March 03, 2015, 08:24:17 PM
Please replace the '\n' with '<br>' in your message string.