cfcontent in IE 6 not working

Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default cfcontent in IE 6 not working

    The example below works fine in Firefox however in IE 6 sp2, it does not. HTML
    is displayed always with what ever type is set. No matter what type I try to
    open using <cfcontent file=... type=... (pdf, xsl, doc, etc...) html is still
    displayed but works in other browsers. Can someone tell me what's up with IE
    and how to correct. Note cfset to display no debugging. See second example for
    another example.

    The cm.html file:
    <h1>cfcontent_message.htm</h1>

    <p>This is a <em>test message</em> written in HTML.</p>
    <p>This is the <em>second paragraph</em> of the test message.
    As you might expect, it is also written in HTML.</p>

    ------------------------------
    The cc.cfm test file.
    <html>
    <head>
    <title>cfcontent Example</title>
    </head>

    <body>
    <h3>cfcontent Example</h3>

    <cfcontent
    type = "text/plain"
    file = "c:\inetpub\wwwroot\test\cm.htm"
    deleteFile = "No">
    </body>
    </html>

    -----------------------
    Example 2:
    <cfset theServerPath="c:\whereever\">
    <cfset theFile="whatever.xls">
    <cfset mimeType="application/msexcel"> //Note, tried various types:
    vnd.ms-excel, etc...
    <cfsetting enablecfoutputonly="No">
    <cfsetting showdebugoutput="No">
    <cfheader name="Content-Disposition" value="filename=#theFile#"> //Note:
    inline; attachment, etc no help either
    <cfcontent file="#theServer##theFile#" type="#mimeType#">

    wkbia Guest

  2. Similar Questions and Discussions

    1. FLV and cfcontent
      I've been attempting to use cfcontent to supply an FLV file to a flash application. I can't seem to get it to work. Does anyone have an example of...
    2. cfcontent - help please
      Hi In my database there is a field which has links to articles #productdescription#- these articles have been saved as simple text. When a user...
    3. CFCONTENT
      Hello, Is it possible to use <CFCONTENT> within a frame or table layout? seems when I run my code (which is a pop up window), the <cfcontent>...
    4. why use cfcontent?
      Why would one use cfcontent insead of of using cfheader? Sorry if this eems like a daft question but they seem to be the same thing to me.
    5. CFCONTENT and SSL
      I've read several online forums concerning the CFCONTENT - PDF problem but haven't seen anything similar to the problem I'm having... I'm...
  3. #2

    Default Re: cfcontent in IE 6 not working

    Are you using ColdFusion Standalone or MultiServer?

    What version of JRun are you using with this (whatever the built-in version is or updater 6?)

    Stephen Dupre
    Macromedia QA
    sdupre Guest

  4. #3

    Default Re: cfcontent in IE 6 not working

    I am having the same sort of problem. I have got MX 7.0.1 running on a windows
    platform. when i say to open from the open/save link the pdf document is
    downloaded, and then opens pdf viewer, and it then says "can't open the file as
    it can't be found"

    this is the code that i am using:

    <cfset FileDeliver =
    ExpandPath('dmDocuments/subject#qryFile.SubjectUUID#/#qryFile.SystemFileName#')>

    <cfheader name="Content-Type" value="Unknown">
    <cfheader name="Cache-Control" value="private">
    <cfheader name="Content-Disposition"
    value="Attachment;Filename=#qryFile.OriginalFileNa me#">
    <cfcontent type="Application/Unknown" file="#FileDeliver#" deletefile="No">

    any ideas?

    Tony

    ThirdLion 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