|
|||||||
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
Hi guys..
I have quick question. I want to be able to access a funtion inside Ext from outside. Please see the example bleow:
//ext starts here
Ext.onReady(function(){
var spot = new Ext.ux.Spotlight({
easing: 'easeOut',
duration: .3
});
function display() {
spot.show("answerParticipant_faq10");
}
});
//ext ends here
function fnDisplayAnswer(ansId) {
var ObjContent11 = document.getElementById("answerParticipant_faq10");
ObjContent11.style.display = 'block';
display();
//Ext.show(ansId);
}
I want to be able to call display function from another function that is outside of ext (ex: fnDisplayAnswer) |
|
#2
|
||||
|
||||
|
You'll have to create a global function. To keep things clean you should put these kinds of globals in your own namespace, e.g.
Ext.ns('mynamespace');
mynamespace.display = function(){
spot.show("answerParticipant_faq10");
}
...
mynamespace.display();
__________________
Condor
|
|
#3
|
|||
|
|||
|
thanks condor for your help...it works !!!
|
![]() |
| Thread Tools | |
|
|