Reputation: 17
I am having init function and i want to load this init function again by calling the same method. I just want to refresh once the same loaded page.
Example code is
Ext.onReady(Kbase.init, Kbase);
this will call
Kbase.init = function(){
/* ... */
}
I just want to load this init function again in same js file. Or else I just want to refresh once the same js page.
Upvotes: 0
Views: 72
Reputation: 3495
Use Below Code
var cnt=1;
var repeatFunction = setInterval(function(){
if(cnt<3){
//callYourFunction();
alert('function called :'+cnt);
Kbase.init;
}
else{
repeatFunction =null;
}
cnt=cnt+1;
},500);
Use setInterval()
will meet your task.
Upvotes: 1
Reputation: 43481
Just try to call init function once more.
Ext.onRead(Kbase.init, Kbase);
/* ... */
$("button").click(function(){
Kbase.init;
});
Or check if there is any "updated" function for that object.
Upvotes: 1