Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cfwindow CFdiv - div not binding after first use

Posted on 2010-11-24
10
Medium Priority
?
506 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 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

971 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