Curtis
Curtis

Reputation: 11

ColdFusion - page with CFCHART inserts JS into HTML <head> - Test and Prod servers it is at top of <head> my local is at bottom and causes JS conflict

How can i ensure that the CFCHART JS is appended to the beginning of the not the end?

Three servers, one with development, two with standard CF installation. CF2021 2021.0.12.330257 Update12 java 11.0.21

On Development CF version it places the CFHART JS at the bottom of the head, wheras Standard version is placing the CFCHART JS at the top.

On development server if I move it physically to the top after the 2nd meta tag. the page JS functions as desired.

<head>
<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

--- enterprise version has the CFCHART JS here ---

.....
lots of link, meta, script tags
.....

--- development version has the CFCHART JS here ---
</head>

I noticed the only code difference between servers was the generated HTML (source). The CFCHART JS placement at the end of the is causing issues with another JS library.

I expected CF to generate the pages the same regardless if enterprise or development version.

<script type="text/javascript">/* <![CDATA[ */_cf_loadingtexthtml="<img alt=' ' src='/cf_scripts/scripts/ajax/resources/cf/images/loading.gif'/>"; _cf_contextpath=""; _cf_ajaxscriptsrc="/cf_scripts/scripts/ajax"; _cf_jsonprefix='//'; _cf_websocket_port=8584; _cf_flash_policy_port=1243; _cf_clientid='22197109ACB32E37EA4FF494B34F0074';/* ]]> */</script>
<script type="text/javascript" src="/cf_scripts/scripts/ajax/messages/cfmessage.js"></script>
<script type="text/javascript" src="/cf_scripts/scripts/ajax/package/cfajax.js"></script>
<script type="text/javascript" src="/cf_scripts/scripts/ajax/smp/swfobject.js"></script>
<script type="text/javascript" src="/cf_scripts/scripts/ajax/jquery/jquery.js"></script>
<script type="text/javascript" src="/cf_scripts/scripts/chart/cfchart-lite.js"></script>
<script type="text/javascript" src="/cf_scripts/scripts/chart/cfchart-html.js"></script>
<script type="text/javascript" src="/cf_scripts/scripts/chart/cfchart.js"></script>
<script type="text/javascript" src="/cf_scripts/scripts/chart/license.js"></script>```

Upvotes: 0

Views: 123

Answers (0)

Related Questions