1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    104
    Answers
    4
    Vote Rating
    0
    izak18 is on a distinguished road

      0  

    Default Unanswered: Urlfield working, innerHtml doesn't

    Unanswered: Urlfield working, innerHtml doesn't


    Hi everybody, I have a problem, when I try to use a urlfield, this is my component:

    Code:
    xtype: 'urlfield',
    label: 'Telephone',
    //name: 'TEL_NUMBER',
    readOnly: true,
    listeners: {
    	'painted': function(ele) {
    		var record = solicitanteOC.getRecord();
    		if (record.data.TEL_NUMBER != '') {
    			//ele.setValue('<a href="tel:' + record.data.TEL_NUMBER + '"></a>');
    			ele.setHtml('<a href="tel:' + record.data.TEL_NUMBER + '">' + record.data.TEL_NUMBER + '</a>');                                
    		}
    	}
    }
    Url is working, but when I see it in my page, I don't know what happen but it looks like this:

    bb90563ba0b24b60bfacb89.png

    2 lines in the field? one in blank and the other with the url ... what do i have to do?

    thanks in advance!

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Answers
    124
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi!
    Actually, it is not an empty space , it is an input field.

    The Url field creates an HTML5 url input or you may say, the url field is just a normal text field.

    Because url field inherits from textfield it gains all of the functionality that text fields provide, including getting and setting the value at runtime, validations and various events that are fired as the user interacts with the component.

    Sample:-
    Code:
    {
           xtype: 'urlfield',
           label: 'Url'  ,
           html:'<a href="#">Sample Anchor</a>'
     }
    urlField.png

    For More info on urlField, check this:-
    http://docs.sencha.com/touch/2-0/#!/api/Ext.field.Url
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    104
    Answers
    4
    Vote Rating
    0
    izak18 is on a distinguished road

      0  

    Default


    Yeah, urlfield is just a type of textfield, so that not works for me.
    I resolve this "issue" "making up" the field with a css and adding focus() in the listener of the field:
    I hope it can be useful to others.

    Code:
    .x-input-url
    {
        color:Blue;
        text-decoration:underline;
        font-size:16px;
        cursor:pointer;
    }
    Code:
    xtype: 'urlfield',
    label: 'Teléfono',
    readOnly: true,
    name: 'TEL_NUMBER',
    listeners: {
    	'focus': function(ele) {
    		var nombre = solicitanteOC.getRecord().data.NAME_TEXT;
    		var nro = solicitanteOC.getRecord().data.TEL_NUMBER;
    		if (nro) {
    			Ext.Msg.confirm('Contacto', 'Llamar a ' + nombre + "?", function(res) {
    				if (res == 'si') {
    					window.location = 'tel:' + nro;
    				}
    			}, this);
    		}
    	}
    }
    Thanks anyway!

Thread Participants: 1

Tags for this Thread

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..."