1

Is it possible to call Firefox Save As dialog ( chrome://mozapps/content/downloads/unknownContentType.xul ) with specifying URL?

I found that class for this dialog stored in "nsHelperAppDlg.js" and called "nsUnknownContentTypeDialog", but i don't understand how to use it :(

I want to create extension, that show firefox "save as" dialog on specifying URLl and give a choice which program to save it with.

Help please!

  • For the reference, this question in Mozilla newsgroups http://groups.google.com/group/mozilla.dev.extensions/browse_frm/thread/c64c4fa7cb2958d4# – Nickolay Oct 12 '09 at 05:55

2 Answers2

2

What you really want is the saveURL method in contentAreaUtils.js. That will give you the exact behavior that Firefox has (since that's what Firefox calls).

sdwilsh
  • 4,674
  • 1
  • 22
  • 20
  • He's actually asking about a different dialog. – Nickolay Oct 12 '09 at 05:53
  • I trying, but this invoke's standard dialog "save as". But i need dialog give a choice which program to save it with. –  Oct 12 '09 at 07:49
  • Ah, in that case I think you want to use this method: http://mxr.mozilla.org/mozilla-central/source/uriloader/exthandler/nsIExternalHelperAppService.idl#71 – sdwilsh Oct 12 '09 at 16:44
  • To sdwilsh - description of that function: "Binds an external helper application to a stream listener" Thank you, but it's different function :( –  Oct 13 '09 at 03:49
0

This has helped me in displaying the save-as dialog, or previewing data in-browser

How to force save as dialog box in firefox besides changing headers?

Community
  • 1
  • 1
Quamis
  • 10,924
  • 12
  • 50
  • 66