EasyUI Forum
September 13, 2025, 09:11:53 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to display new lines in messager plugin?  (Read 7295 times)
r2ferna
Newbie
*
Posts: 21


View Profile
« 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(); }
    }
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: March 03, 2015, 08:24:17 PM »

Please replace the '\n' with '<br>' in your message string.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!