Error processing javascript in markup
Copy link to clipboard
Copied
I am including a google map (extensive javascript with ajax xml call in it) in <cflayoutarea> and get "Error processing javascript in markup" if I call it with the "
source" attribute, thus:
<cflayoutarea align="center" name="tab7" overflow="auto" title="Programs" source="inc_showschools.cfm" >
</cflayoutarea>
But it works fine if I call it thus:
<cflayoutarea align="center" name="tab7" overflow="auto" title="Programs" >
<cfinclude template="inc_showschools.cfm">
</cflayoutarea>
Any idea how to fix?
Thanks!
Copy link to clipboard
Copied
The SOURCE attribute value should be a URL. Is "inc_showschools.cfm" a valid URL, relative to the URL of the main request? NB: <cfinclude> paths are relative to the CF template calling them; URLs are relative to the main request's URL. So what works for one will not necessarily (and more often than not will not ~) work interchangeably.
Ref: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7a23.html
--
Adam
Copy link to clipboard
Copied
Thanks for your reply. The templates are all in the same directory, so that should not be the problem, correct?
KD
Copy link to clipboard
Copied
I tried that and got
The tag does not allow the attribute(s) PARAMS. The valid attribute(s) are CSSSRC,SCRIPTSRC,TAGS.
Sorry. It appears the param attribute is only available from Coldfusion 9.
Copy link to clipboard
Copied
Place cfajaximport at the top of the page. It should include a reference to the google-map key, and to any AJAX tags used on the page. For example,
<cfajaximport params=#{googlemapkey="your_googlemap_key"}# tags="cftooltip,cfform">
Copy link to clipboard
Copied
Thanks for the reply!
I tried that and got
The tag does not allow the attribute(s) PARAMS. The valid attribute(s) are CSSSRC,SCRIPTSRC,TAGS.
I tried it with scriptsrc and got
Use cfajaximport tag to specify SCRIPTSRC or make sure all ajax controls are inside a single cfform tag that has SCRIPTSRC.
Am I missing something obvious?
Thanks again. KD
PS. I am running CF8

