PDA

View Full Version : link on a menu



blex2010
29 Dec 2010, 4:24 PM
I have a list of documents and when he user clicks one I want to open it. However the normal browser behavior is to open SOME document types in a window and others it will save depending on how they have it configured. I want to honor their settings in Ext so I was wondering how to do this using the simple example of pressing a button to open the selected document.

It could be a word document that opens a save box or a pdf that opens in a window for example.

Condor
30 Dec 2010, 12:42 AM
1. Use Animal's LinkButton user extension for this.
2. If the document opens in a window or shows a save dialog is determined by the server. It needs to specify the Content-disposition in the response header (inline or attachment).

blex2010
30 Dec 2010, 8:39 AM
ok related to this if I have a grid with files in it and want to allow double click to open the file is there a "good" way to handle this?

Condor
30 Dec 2010, 8:45 AM
Yes, in that case LinkButton won't work, but you could use my Ext.ux.Report user extension instead.