How to suggest a filename in a SaveAs dialog

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default How to suggest a filename in a SaveAs dialog

    Hi, I have a custom object which shows a SaveAs dialog like this saveLoc =
    dreamweaver.browseForFileURL('save', 'Save file as', false, true, theFilter);
    What I want is to put a suggested file name for saving the file in the 'File
    name:' box of the dialog, like 'test' or 'test.htm' But no matter what I do,
    this box always appears empty. Could someone please tell me how to put a file
    name in it? Thanks

    harpo_ Guest

  2. Similar Questions and Discussions

    1. trouble with saveAS
      I am having a problem with a javascript function. I can save as a Tiff with no problem - but now I would like to have another option that allows...
    2. Compression when SaveAs PDF to Tiff
      My adobe versions are 8.1.2. The code works fine in 'debug' mode, however when running the compiled code, the converted image has a compression of...
    3. saveAs from JSObject in browser
      I am currently attempting to use IAC to run the saveAs from the JSObject in Adobe 5.0 to save a copy of a .pdf. My code will successfully save a...
    4. SaveAs txt file with VB6
      Using Acrobat 5 & VB6. Want to programmatically "SaveAs" a pdf to txt file. I can do it in Acrobat but can find no "SaveAs" method exposed...
    5. COM excel SaveAs - Web Page?
      Hi, I am trying to allow my Intranet users to upload their Microsoft Office Documents and then have them viewed as .html files. So far,...
  3. #2

    Default Re: How to suggest a filename in a SaveAs dialog

    harpo_ wrote:
    > Hi, I have a custom object which shows a SaveAs dialog like this saveLoc =
    > dreamweaver.browseForFileURL('save', 'Save file as', false, true, theFilter);
    > What I want is to put a suggested file name for saving the file in the 'File
    > name:' box of the dialog, like 'test' or 'test.htm' But no matter what I do,
    > this box always appears empty. Could someone please tell me how to put a file
    > name in it? Thanks
    There seem to be some inconsistancies with browseForFileURL and the
    various types of browseing: save, select and open. Some features will
    only be available to select, but not to save. There are also a few extra
    parameters that are not doumented. Based upon what I have seen in the
    config folders, there are 5 documented parameters, and at least 3
    undocumented ones. The 6th parameter is a folder URL that specifies the
    folder in which to open the dialog to. However, this parameter only
    seemd to work with select and not the other two.

    The 7th parameter I have no idea what it is for, as the only example
    (maybe there were a couple) that had it passed in an empty string for
    that parameter.

    The 8th parameter appears to do something like wha tyou want it to.,
    however, again, it only seems to work for select and not open and save
    dialogs. So if you were to do something like this:
    dw.browseForFileURL('select', 'Save file as', false, true, theFilter,"",
    "", "test.htm")

    you should be able to get text.htm to apear as the "default" file name.
    You do need to be aware though that if the user cancels the dialog, the
    file name you defaulted to will be returned by the dw.browseForFileURL
    function. I've not personally tried using this parameter, so I don't
    have a ready way around the issue.


    As with any undocumented methods, use at your own risk.


    --
    Danilo Celic
    | Extending Knowledge, Daily [url]http://CommunityMX.com/[/url]
    danilocelic *TMM* Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139