1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    130
    Vote Rating
    0
    coooolmagic is on a distinguished road

      0  

    Question how to call a URL on a button click?

    how to call a URL on a button click?


    hi all

    I have a button, how can I call a URL on click of it.
    This button is part of a form panel.

    lets say I want to open http://www.sencha.com on click of it

  2. #2
    Sencha User tysoncadenhead's Avatar
    Join Date
    Jul 2009
    Location
    Nashville TN
    Posts
    16
    Vote Rating
    0
    tysoncadenhead is on a distinguished road

      0  

    Default


    Code:
    {
       xtype: 'button',
       text: 'My Button',
       handler: function(){
          window.location = 'http://sencha.com';
       }
    }
    Tyson Cadenhead
    User Interface Developer
    http://tysonlloydcadenhead.com

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

      0  

    Default


    That is not a good solution.

    Setting window.location is not friendly to the user.

    The user does not know that is supposed to be a link (you usually get a status bar telling you what a click would do)

    Also, you cannot right click it.

    The best solution is a LinkButton

Similar Threads

  1. [RESOLVED]execute a url upon button click
    By erosszz in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 4 Feb 2010, 7:28 PM
  2. How to Call Servlet on Click of Button
    By myworld100us in forum Ext GWT: Discussion
    Replies: 5
    Last Post: 11 Nov 2009, 7:22 AM
  3. set url of a tab on a button click
    By sabyasachibose in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 5 Jan 2008, 11:49 AM
  4. on click of the row on grid want to call a url
    By vikas.r30 in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 28 Dec 2007, 3:37 AM

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