Tutorial Extjs: Download File

In previous tutorial  we have created “upload file text and image using extjs and php“, now we will use the data as practice of downloading file.  here i used checkbox selection to select data to be downloaded.  to download a file we should get id of the file. Below is part of code from javascript file to get file id will be download.

tbar: [{ 

            text: 'Download',
            iconCls:'download',
		handler:function(){

				var m = SimpleGrid.getSelectionModel().getSelections();
				if(m.length > 0)
				{
					location.href = './article/'+ m[0].get('Fileconten');
				}
				else
				{
					Ext.MessageBox.alert('Message', 'Please choose a file that you want to download');
				}
				}}
          ]

this is a screen shot of this tutorial.

download-file-extjs


download source code

http://www.ziddu.com/download/9513551/download-file.zip.html

Recent Search Term
extjs download file|extjs file download|extjs ajax file download|extjs fileDownload|ext js tutorial|ExtJS download|extjs file-upload|file download using extjs|
Popular Search Term gantz 322|plkn semakan calon 2011|morakiacom|read gantz 322|Gantz 322|

Leave a Reply