Solved

Cfwindow CFdiv - div not binding after first use

Posted on 2010-11-24
10
492 Views
Last Modified: 2012-05-10
I have a page that has a few CFwindows.  Some of those CFwindows use the same CFdiv.  After the first use, the Cfdiv doesn't appear.  
<cfwindow x="50" y="50" width="840" height="560" name="newAnonParticipant" minHeight="400" minWidth="600" title="New Anonymous Participant" initshow="false" source="dspNewAnonParticipant.cfm?benchID=#attributes.benchID#&indivnum=0" />






<td colspan="2">
									<cfdiv id="TaxDeptSizeDiv" bind="url:TaxDeptSizeDiv.cfm?SizeNonUS={Areport_ww}&SizeUS={Areport_us}&namePrefix=A" bindonload="true" />
								</td>




Div source:
	<cfset TotalTaxDeptSize = val(url.SizeNonUs) + val(url.SizeUS)>
	Total Tax Dept Size:
		<input type="text" name="#namePrefix#tax_department_size" id="#namePrefix#tax_department_size" value="#val(TotalTaxDeptSize)#" size="5" maxlength="10" readonly="true"/>

Open in new window

0
Comment
Question by:lantervj
  • 5
  • 3
  • 2
10 Comments
 
LVL 28

Expert Comment

by:Pravin Asar
Comment Utility
Can you check you code

Here is my sample code, which seems to work fine


<cfform name="form1">
<br/>TEXT:<cfinput name="stext1" type="text" >
</cfform>

<cfwindow name="MYWindow"  source="url:AddAccount.cfm?stext1={stext1@blur}"  modal="false" initshow="true"  resizable="false"
title="Tree Window"/>

<cfdiv bindonload="false"   bind="url:AddAccount.cfm?stext1={stext1@blur}" ID="theDiv"
        style="background-color:##CCffFF; color:red; height:100"/>

<!--- AddAccount.cfm --->

<cfif IsDefined("URL.stext1")>
<cfif #len(trim(url.stext1))# eq 0>
<h2>NO INPUT SPECIFIED</h2>
<cfexit>
<cfelse>
<cfoutput>
<h2>USER INPUT IS  #URL.stext1#</h2>
</cfoutput>
</cfif>

0
 
LVL 28

Expert Comment

by:Pravin Asar
Comment Utility
To debug append cfdebug to your url

e.g.

http://www.yourdomain.com/yourpagec.cfm?cfdebug

0
 

Author Comment

by:lantervj
Comment Utility
check my code for what?
0
 
LVL 52

Expert Comment

by:_agx_
Comment Utility
Some of those CFwindows use the same CFdiv

What do you mean "the same CFDIV"?  The same "id", cfdiv's referencing the same file, ...?  The code snippet only has one cfwindow and cfdiv, so it doesn't really illustrate the problem.
0
 

Author Comment

by:lantervj
Comment Utility

main page

<cfwindow x="50" y="50" width="840" height="560" name="newParticipant" minHeight="400" minWidth="400" title="New Participant" initshow="false" source="dspNewParticipant.cfm?benchID=#attributes.benchID#&indivnum={isrecnum}" />

<cfwindow x="50" y="50" width="840" height="560" name="newAnonParticipant" minHeight="400" minWidth="600" title="New Anonymous Participant" initshow="false" source="dspNewAnonParticipant.cfm?benchID=#attributes.benchID#&indivnum=0" />

<cfwindow x="50" y="50" width="840" height="760" name="editParticipant" minHeight="400" minWidth="400" title="Edit Participant" initshow="false" source="dspEditParticipant.cfm?benchID=#attributes.benchID#&partID={participantGrid.id}&fullname={participantGrid.full_name}" />

<cfwindow x="50" y="50" width="840" height="560" name="deleteParticipant" minHeight="400" minWidth="400" title="Delete Participant" initshow="false" source="dspDeleteParticipant.cfm?benchID=#attributes.benchID#&partID={participantGrid.id}&participantType={participantGrid.participantType}" />





code used in three of the four CFwindows;

<td colspan="2">

<cfdiv id="TaxDeptSizeDiv" bind="url:TaxDeptSizeDiv.cfm?SizeNonUS={Areport_ww}&SizeUS={Areport_us}&namePrefix=A" bindonload="true" />

</td>



div source code;

<cfparam name="url.SizeNonUs" default="0" />

<cfparam name="url.SizeUs" default="0" />

<!---  name prefix is needed to differentiate between regular participants and anonymous participants and add/edit  2001/11/16 --->

<cfparam name="url.namePrefix" default="" />

<cfoutput>

url.SizeUS: #url.SizeUS#<br> --->

</cfoutput>

<cfif isdefined("url.SizeNonUs")>

<cfoutput>

<cfset TotalTaxDeptSize = val(url.SizeNonUs) + val(url.SizeUS)>

Total Tax Dept Size:

<input type="text" name="#namePrefix#tax_department_size" id="#namePrefix#tax_department_size" value="#val(TotalTaxDeptSize)#" size="5" maxlength="10" readonly="true"/>

</cfoutput>

</cfif>

Open in new window

0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Accepted Solution

by:
lantervj earned 0 total points
Comment Utility
The CFwindow param refreshonshow seems to have done the trick.
0
 
LVL 52

Expert Comment

by:_agx_
Comment Utility
>> code used in three of the four CFwindows;
>> <cfdiv id="TaxDeptSizeDiv"

Are you using the same ID for all 4 divs? By definition ID's should be unique.
0
 

Author Comment

by:lantervj
Comment Utility
I was just about to add a prefix to the div id when I tried the refreshonshow param.  Should I do it anyway? Say, for the sake of good coding practice.
0
 
LVL 52

Expert Comment

by:_agx_
Comment Utility
Yeah, I would.  
0
 

Author Closing Comment

by:lantervj
Comment Utility
solved
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now