Solved

Cfwindow CFdiv - div not binding after first use

Posted on 2010-11-24
10
494 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
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 28

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
 
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
3 Use Cases for Connected Systems

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

 

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

3 Use Cases for Connected Systems

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

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. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

12 Experts available now in Live!

Get 1:1 Help Now