Skip to main content
Participating Frequently
May 13, 2011
Question

CFDIV loading multiple times

  • May 13, 2011
  • 1 reply
  • 401 views

I have a fairly simple page with about 4 cfselect (drop downs) that bind information to a cfdiv. For some reason, after selecting an option from the drop down the CFDIV loads (which is the expected behavior), but then it reloads randomly 3 times.

<cfif IsDefined("FormSubmit") and FormSubmit eq "true">

<cfset formsubmitted = "true">

</cfif>

.....

<cfselect name="preparerID" bind="cfc:#conturl#/getMiscData.getPreparerID()"

bindonload="true" selected="#form.preparerID#" >

</cfselect><br><br>

<b>Appropriation :   </b>

<cfif Isdefined("url.selected_ic")>

<cfset form.selected_ic = #url.selected_ic#>

</cfif>

<cfselect name="selected_ic" bind="cfc:#conturl#/getMiscData.getICs()"

bindonload="true" selected="#form.selected_ic#" >

</cfselect><br><br>

<b>Symbol :   </b>

<cfif Isdefined("url.symbol")>

<cfset form.symbol = #url.symbol#>

</cfif>

<cfselect name="symbol" bind="cfc:#conturl#/getMiscData.getsymbol({selected_ic})"

bindonload="true" selected="#form.symbol#" >

</cfselect><br><br>

<cfinput type=submit name="view" class="button" value="View Report" onClick="javascript:funcsubmit();"/><br>

</cfform>

</cfoutput>

<br>

<cfif IsDefined("formsubmitted") and formsubmitted eq "true">

<cfoutput>

<cfdiv bind="url:dynamicDiv.cfm?symbol={symbol}&selected_ic={selected_ic}&preparerID={preparerID}"

bindonload="false">

</cfdiv>

</cfoutput>

</cfif>

    This topic has been closed for replies.

    1 reply

    talofer99
    Inspiring
    May 14, 2011

    Its hard to tell exacly what is going on, since you din;t post the entier code and the code for "dynamicDiv.cfm".

    I would suggest you do the following (to de-bug this):

    Remove all the CFSELECT but one, if things work well, and it only reload the div once on chnage add another one (cfselect) and repeat the test.

    Do this (adding the cfselect) untill you add them all.

    If this fail (if after elaving only one cfselect) its still reload 3 times, post the full code and I will take a look.