EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: eagleeye on May 08, 2015, 08:35:38 AM



Title: change window size of messager alert
Post by: eagleeye on May 08, 2015, 08:35:38 AM
Hi partners, i need to show messager alert with errors but the default size don“t fit to the messages, are there any code to change the size to window alert?

My code is it:

Code:
 $.messager.alert('Sistema de SOLPEDS y Pedidos', jsondata.mensaje, 'error');

Above line work fine.

In one example i see this with show but it close after some timeout, and i need show it but that user close it.

Code:
$.messager.show({
                                     title: 'Sistema de SOLPEDS y Pedidos, errores en fechas',
                                     msg:jsondata.mensaje,
                                     icon: 'error',
                                     // timeout:4000,
                                     showType: 'show',
                                     width: 600,
                                     height: 350,
                                     style: {
                                     right: '',
                                     top: document.body.scrollTop + document.documentElement.scrollTop,
                                     bottom: ''
                                     }
                                     });

Thanks in advance


Title: Re: change window size of messager alert
Post by: stworthy on May 08, 2015, 06:14:29 PM
Please try the code below to display an alert window with special size.
Code:
$.messager.alert({
title: 'title',
msg: '<div style="height:100px">msg</div>',
icon: 'info',
width: 400
})