1. #1
    Sencha User
    Join Date
    Sep 2010
    Vote Rating
    robertdbuckley is on a distinguished road


    Default How to call a function from a qtip?

    How to call a function from a qtip?


    I am simply trying to call a function from a qtip. The function should open an ext.window and display html. Nothing complicated, but it doesn´t work.

    Cann anyone tell me how to achieve this?



    function metadata() {
                        if (!winMetadata) {
                            var node = treePanel.getSelectionModel().getSelectedNode();
                            var layername = node.text;
                            var winMetadata = new Ext.Window({
                                title: '<span style="color:#00; font-weight:bold;">Metadaten: </span>' + layername,
                                layout: 'fit',
                                text: layername,
                                width: 800,
                                height: 500,
                                closeAction: 'hide',
                                plain: true,
                                items: [ct],
                                buttons: [{
                                    text: 'Schlie&szlig;en',
                                    handler: function () {
    // code in tree
    qtip: "<a href='#' onclick='metadata();'>Metadata</a>

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Vote Rating
    kaendsle is on a distinguished road



    I don't have experience doing this inside a QuickTip pop-up, but I believe you can achieve the desired result wherever HTML is allowed by simply writing event handling into an anchor.

    For example, I have a Google Maps API web application that includes a directions utility (ExtJS Window) accessible through a link in any marker's pop-up InfoWindow. I just call a function (App.utils.getDirections) when the link is clicked:
    <a href="#" onclick="App.utils.getDirections(' + d.strc_num.toString() + ',' + lat + ',' + lng + ');">Get Directions</a>
    The function generates an Ext.Window subclass instance and then calls the show() method on that window.

    EDIT: I realize you have implemented what I suggested so far, and I think the problem is in your metadata() function. I think the problem is that you are instantiating a window called winMetadata but you aren't calling the show() method on it. The business-end (and end of the function) of my equivalent getDirections() function does just that:

                obj = new App.utils.Utility(config);         
    Last edited by kaendsle; 16 Aug 2011 at 8:28 AM. Reason: Clarity

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..." hd porno faketaxi