Skip to main content
Participant
April 17, 2010
Question

cfdiv bind - no results displayed

  • April 17, 2010
  • 1 reply
  • 965 views

I am on GoDaddy, windows, CF8 and got rid of most of the no-permissions errors by using the CFAJAXIMPORT tag, but my bind elements are not loading. when I view the page source, coldfusion seems to have built the Javascript funtions to load the div, but does not actually load the div with the text from more_text.cfm. tried CFPod too, but bind fails there as well.

main.cfm

<cfajaximport scriptsrc="root/CFIDE/scripts/" tags="cfdiv" >
<cfset str = "hello world" />
<cfoutput><h1>#str#</h1></cfoutput>

<cfdiv bind="url:more_text.cfm" id="b1" bindonload="true" tagname="b_1" />

more_text.cfm

<p>Here is some more text for the div</p>

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    April 17, 2010

    I think the tagname attribute must be a valid HTML tag, such as div, p,h2, and so on. Your b_1 isn't. This is therefore what you're after:

    <cfset str = "hello world" />
    <cfoutput><h1>#str#</h1></cfoutput>

    <!--- test also with tagname="h2" --->

    <cfdiv  bind="url:more_text.cfm" id="b1" bindonload="true" tagname="p" />

    more_text.cfm

    Here  is some more text for the div

    esearingAuthor
    Participant
    April 18, 2010

    I had to install the CFIDE/scripts on my site, then point to it using cfajaximport. I also had to rename CFIDE to something else.