PDA

View Full Version : tooltip in extjs 4.0



bee
1 Nov 2011, 3:43 AM
Hi I am looking for tooltip message for text fields I followed http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tip.QuickTipManager , but I am getting error as Uncaught TypeError: Cannot set property 'el' of undefined.
please let me know if anyone has any example for this. I am using extjs 4.0.7

mitchellsimoens
1 Nov 2011, 7:41 AM
Can we get some code?

bee
3 Nov 2011, 1:39 AM
Thanks Michael. I will put the code soon . But basically I followed the same instruction and code defined in documentation 4.0 for QuickTipManager

alucardmc
3 Nov 2011, 6:20 AM
I'm set
tooltip attribute for buttons but it's not working. I'm init QuickTips in app.js:


###############################
# app.js from MVC application on ExtJS
###############################
Ext.Loader.setConfig({
enabled: true,
paths: {
'Et': STATIC_URL + 'js/app/'
}
});
Ext.onReady(function(){
Ext.QuickTips.init();
// create Application
Ext.create('Et.Application');
});

Console browser:


Uncaught TypeError: Cannot call method 'addCls' of null ext-all-debug.js:33574
Uncaught TypeError: Cannot call method 'insertBefore' of null ext-all-debug.js:8265
Uncaught TypeError: Cannot call method 'insertBefore' of null ext-all-debug.js:8265
2 Uncaught TypeError: Cannot call method 'insertBefore' of null ext-all-debug.js:8265

It's ^^ when mouse over. Help me please.




I found error, it's result after udate body: Ext.getBody().update(''); =)

bee
4 Nov 2011, 7:28 AM
Can we get some code?

Hi Michael, I used the code from api only.
// Init the singleton. Any tag-based quick tips will start working.
Ext.tip.QuickTipManager.init();


// Apply a set of config properties to the singleton
Ext.apply(Ext.tip.QuickTipManager.getQuickTip(), {
maxWidth: 200,
minWidth: 100,
showDelay: 50 // Show 50ms after entering target
});




// Manually register a quick tip for a specific element
Ext.tip.QuickTipManager.register({
target: 'mytextfieldforename', // This is my textfield id
title: 'My Tooltip',
text: 'This tooltip was added in code',
width: 100,
dismissDelay: 10000 // Hide after 10 seconds hover
});

I used the same code just replaced container id with my textfield id. Please let me know how exactly it works in extjs 4.0.7. I used other work around like used for fieldLabel : <span data-qtip="message">textField1</span> , but I dont want this way. Please let me know how above code will be worked?

silve69
23 Nov 2011, 12:20 PM
Hello, I have the same issue... how you solved it??
Regards!!

c4stor
18 Apr 2012, 10:23 AM
I have this same issue. I have copied the sample from the API documentation almost exactly... Just changed the id to match one of my elements...

Please advise...