• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfcontent generated unwanted script header

New Here ,
Sep 21, 2015 Sep 21, 2015

Copy link to clipboard

Copied

I have this weird thing happened to cfcontent.

<cfheader name="Content-Disposition" value="attachment;filename=#LSDateFormat(now(),"mm.dd.yy")#.txt">


<cfcontent type="text/plain">
<cfoutput>test_1,test_2,test_3,timestamp#chr(10)#</cfoutput>

This is what generated in the txt file.  It generated the output which I want but also generated the default cfide scripts.  How would I suppress and generate only the output stuff?  Thanks.

<script type="text/javascript" src="/CFIDE/scripts/cfform.js"></script>
<script type="text/javascript" src="/CFIDE/scripts/masks.js"></script>
<script type="text/javascript">
<!--
    _CF_checkheader_search = function(_CF_this)
    {
        //reset on submit
        _CF_error_exists = false;
        _CF_error_messages = new Array();
        _CF_error_fields = new Object();
        _CF_FirstErrorField = null;


        //display error messages and return success
        if( _CF_error_exists )
        {
            if( _CF_error_messages.length > 0 )
            {
                // show alert() message
                _CF_onErrorAlert(_CF_error_messages);
                // set focus to first form error, if the field supports js focus().
                if( _CF_this[_CF_FirstErrorField].type == "text" )
                { _CF_this[_CF_FirstErrorField].focus(); }

            }
            return false;
        }else {
            return true;
        }
    }
//-->
</script>

test_1,test_2,test_3,timestamp

Views

325

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 22, 2015 Sep 22, 2015

Copy link to clipboard

Copied

I think the cfcontent generated that script header stuff.  Any ideas why or a work around that?

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 22, 2015 Sep 22, 2015

Copy link to clipboard

Copied

LATEST

It's because of the Application.cfc that generated script so the cfcontent will take that.  I tried to create sub Application file but it keeps throwing me errors, unable to connect to the component.  I have tried different path to the cfc files but still couldn't find them.  Any suggestions on this?

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation