EasyUI Forum
April 27, 2024, 01:55:51 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Programmatically close $.messager.show  (Read 6368 times)
Kevin
Jr. Member
**
Posts: 52


View Profile Email
« on: June 06, 2016, 08:34:49 AM »

Hi Guys

Is there a way to close the $.messager.show message? I have a function that loads a variable amount of data. Sometimes large amounts of data and sometimes really small amounts. I have a message that tells the user that the system is busy loading the data but when this data is small, the datagrid will populate quickly. Problem is that the message remains visible for a couple more seconds and users feel they need to wait for this to clear before they can do anything on the system. I want to use the 'onLoadSuccess' event of the datagrid to close the message.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: June 06, 2016, 06:30:35 PM »

Please call 'close' method to close a message window.
Code:
dlg = $.messager.show({
title:'My Title',
msg:'Here is a message.',
border:'thin'
});

dlg.dialog('close');  // close it
Logged
Kevin
Jr. Member
**
Posts: 52


View Profile Email
« Reply #2 on: June 08, 2016, 10:11:48 AM »

Thanks Jarry for you help, it works great. You are a true master.
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!