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

Error processing javascript in markup

Explorer ,
Dec 15, 2009 Dec 15, 2009

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!

2.3K
Translate
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
LEGEND ,
Dec 15, 2009 Dec 15, 2009

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

Translate
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
Explorer ,
Dec 16, 2009 Dec 16, 2009

Thanks for your reply. The templates are all in the same directory, so that should not be the problem, correct?

KD

Translate
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
Community Expert ,
Dec 16, 2009 Dec 16, 2009
LATEST

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.

Translate
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
Community Expert ,
Dec 15, 2009 Dec 15, 2009

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">

Translate
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
Explorer ,
Dec 16, 2009 Dec 16, 2009

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

Translate
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