Skip to main content
Inspiring
December 15, 2009
Question

Error processing javascript in markup

  • December 15, 2009
  • 2 replies
  • 2428 views

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!

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    December 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">

    KDN0211Author
    Inspiring
    December 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

    Inspiring
    December 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

    KDN0211Author
    Inspiring
    December 16, 2009

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

    KD

    BKBK
    Community Expert
    Community Expert
    December 16, 2009

    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.