PDA

View Full Version : Start Download



originative
19 Jul 2009, 8:02 AM
Hi,
i have a button in my toolbar,i want that when it is pressed a

httpdotcom
19 Jul 2009, 3:15 PM
...,handler: function() { window.location.href = '/location/of/file.ext' ; }

Condor
19 Jul 2009, 9:58 PM
Or:
1. If you want to open the document in another window:

window.open(href);
2. If you want to start a download (server needs to send Content-disposition:attachment header):

Ext.getDom('id-of-iframe').src = href;

originative
20 Jul 2009, 12:51 AM
It works, Thanks for your help and time :)

oddy
21 Jul 2009, 2:47 AM
Hi guys. I need something simple, like a valid link. Does Ext have it somewhere? Just a simple wrapper around "a" tag. Maybe something that looks like a button, but behaves just like a regular link?

Condor
21 Jul 2009, 3:16 AM
Not yet, it's a feature request (http://extjs.com/forum/showthread.php?t=12288) (LinkButton example included).

oddy
21 Jul 2009, 12:19 PM
Not yet, it's a feature request (http://extjs.com/forum/showthread.php?t=12288) (LinkButton example included).
Thank you :)