Timed Call function for ExtJS

Source: Internet
Author: User

<link rel="stylesheet" type="text/css" href=" <%=basepath%>/ext-3.4/resources/css/ext-all.css ">    <script type="text/javascript" src="<%=basepath%>/ Ext-3.4/adapter/ext/ext-base.js "></script>    <script type="text/javascript" src="<%=basepath%>/ext-3.4/ Ext-all-debug.js "></script>    <script type="text/javascript" src="<%=basepath%>/ Jsp/js/hellowindow.js "></script>    <script type="Text/javascript">        //We know that the timer function provided by JavaScript has settimeout (call function after a specified time), setinterval (Specify frequency call function), etc.        //EXT timing has Ext.util.DelayedTask similar to Settimeout,ext.util.taskrunner Java thread function, can generate independent tasks or threads        varTask =NewExt.util.DelayedTask ( function(){Console.info (' Start execution function ... ');        }); Task.delay ( the);//below demonstrates how Delayedtask receives parameters        The //function receives the order of the parameter data set in the corresponding parameter         function catchsome(command1,command2,command3){Console.info (' executive work: '+command1+', '+command2+', '+COMMAND3); }varTask2 =NewExt.util.DelayedTask ();//The parameters worn to the function must be defined in the array        varcommands = [' Buy milk ',' buy a newspaper ',' pick up the kids ']; Task2.delay ( the,//How long after executionCatchsome,//function to execute             This,//scope of function execution, default windowCommands//Parameters);//Ext.util.TaskRunner usage is as follows         function sayhi(){Console.debug (' Hi '); }varTask3 = {Run:sayhi, interval: +};//Instantiate Taskrunner and call Start () to start the task        varRunner =NewExt.util.TaskRunner (); Runner.start (TASK3);//can also be started by Taskmgr (Task Manager) class        vari =0; function sayHello(){            if(I >=Ten) {Ext.TaskMgr.stop (TASK4); } console.debug (' stop say Hello ');        i++; }varTask4 = {Run:sayhello, interval: -}; Ext.TaskMgr.start (TASK4);</script>

Timed Call function for ExtJS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.