Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cfwindow CFdiv - div not binding after first use

Posted on 2010-11-24
10
Medium Priority
?
503 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
Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

 
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

DFW AZURE MEETUP TONIGHT FRI 6PM

We will be discussing what Azure Stack is, how does it fit into the suit of offerings that Azure has currently, and where can it fit into your organizations technology stack. We will also be discussing limitations of the platform while covering various applicable scenarios.

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…
Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

721 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