EasyUI Forum
September 19, 2025, 03:30:48 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: onLoad event with easyloader  (Read 13490 times)
Ellipsis
Full Member
***
Posts: 113


View Profile WWW
« on: May 30, 2012, 02:31:24 AM »

Hello,

I hope someone can give me a pointer in the good direction:

When using the easyloader, I want to call a function when all dependencies are loaded.
How do I do this?


Best regards,
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 30, 2012, 03:01:31 AM »

The example below shows how to use the easyloader plugin to load the specified module:
Code:
easyloader.load('messager', function(){        // load the specified module  
    $.messager.alert('Title', 'load ok'); 
});
The code can also be written as:
Code:
using('messager', function(){        // load the specified module  
    $.messager.alert('Title', 'load ok'); 
});
Logged
Ellipsis
Full Member
***
Posts: 113


View Profile WWW
« Reply #2 on: May 30, 2012, 03:25:01 AM »

Thank you so much!

The given was my first attempt, but it seemed to fire the called function to fast.
I got : datagrid not defined

Now it works, I wish I could see what I did wrong.

There is also the possibillity to use onProgress, how would this work then?
« Last Edit: June 07, 2012, 01:11:25 AM by reno1979 » 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!