Results 1 to 2 of 2

Thread: How to start an automatic file download after a dblclick event on a button?

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Location
    France
    Posts
    159
    Answers
    2
    Vote Rating
    3
      0  

    Default Answered: How to start an automatic file download after a dblclick event on a button?

    Hi,

    I'm trying to download a file after a double click event on a button. So I catched the event:
    PHP Code:
    button.el.on('dblclick', function (cmp) { }); 
    But I don't know how to start an html script automaticly.
    I don't want to pass by a text link like:
    PHP Code:
    button.el.on('dblclick', function (cmp) {
                        var 
    win Ext.create('Ext.window.Window', {
                            
    title'Document',
                            
    width80,
                            
    height50,
                            
    html'<a href="' + [THE PATH] + '">Click Here</a>'
                        
    }).show();
    }); 
    Thanks in advance !

  2. inside your double click listener, you can do:

    Code:
    var url = 'your_file_url';
    window.open(url);
    where window.open is standard javascript (not ExtJS specific)

  3. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,100
    Answers
    113
    Vote Rating
    100
      1  

    Default

    inside your double click listener, you can do:

    Code:
    var url = 'your_file_url';
    window.open(url);
    where window.open is standard javascript (not ExtJS specific)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •