1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    1
    Vote Rating
    0
    aliasadsahu is on a distinguished road

      0  

    Default Download link to a file with Button

    Download link to a file with Button


    Hi I want to make a button which will start downloading a file when user clicks on it. How it is possible?

  2. #2
    Sencha User
    Join Date
    Jul 2009
    Location
    Trabzon
    Posts
    99
    Vote Rating
    0
    harun is on a distinguished road

      0  

    Default


    it is so easy:

    Code:
        
    Button button = new Button( "Download" );        
    button.addSelectionListener( new SelectionListener<ButtonEvent>() {
                
                @Override
                public void componentSelected( ButtonEvent ce)
                {
                    Window.open( url, "_blank", null );
                }
            } );
    Website: harunates.com
    Blog: blog.harunates.com
    Feel free to contact me harun@harunates.com

Thread Participants: 1