Solved

Cfwindow CFdiv - div not binding after first use

Posted on 2010-11-24
10
498 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 29

Expert Comment

by:Pravin Asar
ID: 34212220
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 29

Expert Comment

by:Pravin Asar
ID: 34212222
To debug append cfdebug to your url

e.g.

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

0
 

Author Comment

by:lantervj
ID: 34215091
check my code for what?
0
Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

 
LVL 52

Expert Comment

by:_agx_
ID: 34215180
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
ID: 34218998

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
 

Accepted Solution

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

Expert Comment

by:_agx_
ID: 34220015
>> 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
ID: 34222593
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_
ID: 34223018
Yeah, I would.  
0
 

Author Closing Comment

by:lantervj
ID: 34246389
solved
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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