-
4 Mar 2008 7:46 AM #1
QuickTips not being shown
QuickTips not being shown
Hi there.
I am having some problems with showing quicktips.
This is the declaration in HTML:
The javascript for this field:Code:<div class="caixa_esquerda"> <div class="legenda_caixas">Email:</div> <div class="dados_caixa"> <input type="text" id="email"/> </div> </div>
but the quicktip is not being shown. i have initialized it!Code:var prof_mail = new Ext.form.TextField({ fieldLabel:'Email', name:'mail', width:190, vtype:'email', allowBlank:false, emptyText:'nomeutilizador@dominio.com' }); prof_mail.applyTo('email');
I get the following error in Firebug:
B has no properties
ext-all.js (line 98)
when i create the form using Extjs and then, rendering it, the quicktips are shown quite good. but when i declare the form in HTML and then applying the javascript to the HTML, they aren't shown...
Any solution for this ?
Jo
-
4 Mar 2008 11:06 AM #2
Try this:
abraCode:var prof_mail = new Ext.form.TextField({ fieldLabel:'Email', name:'mail', width:190, vtype:'email', allowBlank:false, emptyText:'nomeutilizador@dominio.com' }); prof_mail.applyToMarkup(document.getElementById('email'));
-
5 Mar 2008 2:10 AM #3
i get this error using that function:
prof_mail.applyToMarkup is not a function
-
6 Mar 2008 1:41 AM #4
is it possible to enable quicktips when i create the form in this way ?
-
7 Mar 2008 6:44 AM #5
-
7 Mar 2008 8:06 AM #6
In the code you have posted here, you were using a the applyTo function.
Did you try changing it to applyToMarkup?
I have this working for me.
the html:Code:Ext.QuickTips.init(); Ext.QuickTips.enable(); Ext.onReady(function(){ var prof_mail = new Ext.form.TextField({ fieldLabel:'Email', name:'mail', width:190, vtype:'email', allowBlank:false, emptyText:'nomeutilizador@dominio.com' }); prof_mail.applyToMarkup(document.getElementById('email')); });
Hope this can be usefull.HTML Code:<div class="caixa_esquerda"> <div class="legenda_caixas">Email:</div> <div class="dados_caixa"> <input type="text" id="email"/> </div> </div>

-
7 Mar 2008 9:16 AM #7
when i do it, i get this error in firebug:
prof_mail.applyToMarkup is not a function
prof_mail.applyToMarkup(document.getElementById('email'));
is that a funcion from Extjs 2.0 ? i am using 1.1.1...
-
8 Mar 2008 1:14 AM #8
applyToMarkup() is 2.x. What you've used (applyTo) is correct. Post more of your code, because that fragment works fine (i.e., tip is displayed for invalid e-mail address) in my 1.1:
Code:<html> <head> <title>QTip</title> <link rel="stylesheet" type="text/css" href="../../ext111/resources/css/ext-all.css" /> <script type="text/javascript" src="../../ext111/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="../../ext111/ext-all-debug.js"></script> <script> Ext.BLANK_IMAGE_URL = '../../ext111/resources/images/default/s.gif'; Ext.onReady(function(){ Ext.QuickTips.init(); var prof_mail = new Ext.form.TextField({ fieldLabel:'Email', name:'mail', width:190, vtype:'email', allowBlank:false, emptyText:'nomeutilizador@dominio.com' }); prof_mail.applyTo('email'); }); </script> </head> <body> <div class="caixa_esquerda"> <div class="legenda_caixas">Email:</div> <div class="dados_caixa"> <input type="text" id="email" /> </div> </div> </body> </html>
-
10 Mar 2008 2:52 AM #9
it is resolved now... it was because of this:
thanks you all!Code:Ext.form.Field.prototype.msgTarget = 'side';



Reply With Quote