1. #1
    Sencha Premium Member
    Join Date
    Jul 2010
    Posts
    9
    Vote Rating
    0
    Jeremy Solarz is on a distinguished road

      0  

    Default Generate a normal Link (<a href="...">) in ExtJS

    Generate a normal Link (<a href="...">) in ExtJS


    Hi,

    I'm struggling with a really simple problem here.

    I want to generate a normal link in frontend but it seems to don't work somehow. Here is the code i use for the generation of the link (the link was a button before which obened a new window with a specified URL on click).

    HTML Code:
    { 
      xtype: 'button', 
      id: 'PrintTool', 
      tooltip: 'Printer Friendly', 
      iconCls: 'icon-printerFriendly', 
      html: '<a href=\"http:\/\/www.google.at\">x<\/a>', 
      listeners: { 
        'click': function(button,event) { 
            console.log(this);
            console.log(event);
            this.restoreClick();
            return true; 
        }
      }
    }
    When ExtJS renders the button it makes, hence i add an html attribute to the object, a link out of it.

    I can see the link with FireBug. When I click the link I get the output

    console.log(this);
    console.log(event);

    in the console

    So the event is fired. But the link gets never opened.

    I think it has something to do with the CLICK-event getting stopped from ExtJS.

    It seems that despite in Firebug there is no button in the HTML the object passed to the click event is still the button.

    So me question is, how can a create normal HTML in ExtJS without setting a xtype of button. Or how can I generate a normal link.

    I used to open a popup after the button was clicked. The popup got blocked from chrome, IE and various other browser so I have to use a normal link with a URL insted.

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,501
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Use a LinkButton

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2010
    Posts
    9
    Vote Rating
    0
    Jeremy Solarz is on a distinguished road

      0  

    Default Thanks

    Thanks


    Thanks for the quick answer

Similar Threads

  1. Same DataStore for Grid with "normal" and grouping view
    By piwo in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 19 Aug 2009, 2:46 PM
  2. Replies: 3
    Last Post: 19 Aug 2009, 3:41 AM
  3. Combo can not display normal,also add config "hideMode:'offsets' "
    By dzhw681 in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 23 Dec 2008, 12:04 AM
  4. Can u mix enctype : "multipart/form-data" with normal fields?
    By pokerking400 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 6 Sep 2008, 5:33 AM
  5. Replies: 0
    Last Post: 29 Feb 2008, 5:35 AM

Thread Participants: 1

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