1. #1
    Ext User
    Join Date
    Oct 2007
    Posts
    20
    Vote Rating
    0
    joaosobrinho is on a distinguished road

      0  

    Question QuickTips not being shown

    QuickTips not being shown


    Hi there.

    I am having some problems with showing quicktips.

    This is the declaration in HTML:

    Code:
    							<div class="caixa_esquerda">
    								<div class="legenda_caixas">Email:</div>
    								<div class="dados_caixa">
    								  <input type="text"  id="email"/>
    							  </div>
    							</div>
    The javascript for this field:

    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');
    but the quicktip is not being shown. i have initialized it!
    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

  2. #2
    Sencha User zig999's Avatar
    Join Date
    Mar 2008
    Posts
    62
    Vote Rating
    2
    zig999 is on a distinguished road

      0  

    Default


    Try this:

    Code:
    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'));
    abra

  3. #3
    Ext User
    Join Date
    Oct 2007
    Posts
    20
    Vote Rating
    0
    joaosobrinho is on a distinguished road

      0  

    Default


    i get this error using that function:

    prof_mail.applyToMarkup is not a function

  4. #4
    Ext User
    Join Date
    Oct 2007
    Posts
    20
    Vote Rating
    0
    joaosobrinho is on a distinguished road

      0  

    Default


    is it possible to enable quicktips when i create the form in this way ?

  5. #5
    Ext User
    Join Date
    Oct 2007
    Posts
    20
    Vote Rating
    0
    joaosobrinho is on a distinguished road

      0  

    Default


    anyone... ?

  6. #6
    Sencha User zig999's Avatar
    Join Date
    Mar 2008
    Posts
    62
    Vote Rating
    2
    zig999 is on a distinguished road

      0  

    Default


    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.

    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'));	
    });
    the html:
    HTML Code:
    <div class="caixa_esquerda">
    <div class="legenda_caixas">Email:</div>
    <div class="dados_caixa">
    <input type="text"  id="email"/>
    </div>
    </div>
    Hope this can be usefull.

  7. #7
    Ext User
    Join Date
    Oct 2007
    Posts
    20
    Vote Rating
    0
    joaosobrinho is on a distinguished road

      0  

    Default


    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. #8
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750
    Vote Rating
    9
    fay will become famous soon enough fay will become famous soon enough

      0  

    Default


    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>

  9. #9
    Ext User
    Join Date
    Oct 2007
    Posts
    20
    Vote Rating
    0
    joaosobrinho is on a distinguished road

      0  

    Default


    it is resolved now... it was because of this:

    Code:
    Ext.form.Field.prototype.msgTarget = 'side';
    thanks you all!

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi