Solved

cfdiv erratic bind

Posted on 2011-02-17
15
475 Views
Last Modified: 2012-05-11
When I first added the cfdiv (to display a grid-like table) it worked fine passing on variable in the URL scope.  I added a second variable and it worked fine.  I added a thrid variable and got an error saying the variable was not defined in the URL scope. I removed the third variable and got the error on the second variable. I remove the second variable and it worked again. I added the second variable back in and it worked.  I added the third variable back in and it worked.  I added a fourthe variable and it worked.  I added a fifth variable and it failed and continued to fail as I removed one variable at a time.

This appears to be a little know bug but there's not much info on it.
<tr>
<td valign="top" colspan="2">
<cflayout type="tab" name="Modify Job" style="width:1050px">
<cflayoutarea title="Modify Job">
<cfform action="" method="POST">
<cfinclude template="divSearchParms.cfm" />
<cfdiv bind="url:dspPagesDiv.cfm?selectJobID={selectJobID}&selectCompany_Name={selectCompany_Name}&selectJobTitle={selectJobTitle}&selectMarketer={selectMarketer}&board_type={board_type}" id="pageDiv" />

The included divSearchParms.cfm--------------------------------------
<div style="background-color:ebebeb; align:center;">
<table>
<tr><td><table  style="font-size:7;">
<tr><td align="center">Job ID:</td>
</tr><tr><td><cfinput type="text" name="selectJobID" size="8"></td></tr></table></td>	
<td><table style="font-size:7;">
<tr><td align="center">Company Name:</td></tr>
<tr><td><cfinput type="text" name="selectCompany_Name"></td></tr></table></td>
<td><table style="font-size:7;"><tr>				<td><strong>Job Title:</strong></td></tr>
<tr><td><cfinput type="text" name="selectjobTitle" /></td></tr>
</table></td>


The div--------------------------------------------------------
<cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
<cfinvokeargument name="board_type" value="#url.board_type#">
<cfinvokeargument name="selectJobID" value="#url.selectJobID#">
<cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
<cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
<cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
<cfinvokeargument name="sort_order" value="#attributes.sort_order#">
<cfinvokeargument name="sort_col" value="#attributes.sort_col#">
<cfinvokeargument name="start" value="#variables.start#">
<cfinvokeargument name="stop" value="#variables.stop#">
</cfinvoke>
<cfinvoke component="cfc.basic" method="getPagesCount" returnvariable="qPageCount">
<cfinvokeargument name="board_type" value="#url.board_type#">
<cfinvokeargument name="selectJobID" value="#url.selectJobID#">
<cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
<cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
<cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
<cfinvokeargument name="sort_order" value="#attributes.sort_order#">
<cfinvokeargument name="sort_col" value="#attributes.sort_col#">
<cfinvokeargument name="start" value="#variables.start#">
<cfinvokeargument name="stop" value="#variables.stop#">
</cfinvoke>

<cfoutput>
<table id="articles" style="font-size:14;"><tr>
<th width="30px" style="text-align:center"><a href="" onClick="javascript: ColdFusion.navigate('dspPagesDiv.cfm?job_type=#attributes.board_type#&sort_col=id&sort_order=#attributes.sort_order#','pageDiv'); return false;">JobID</a></th>
<th ><a href="" onClick="javascript: ColdFusion.navigate('dspPagesDiv.cfm?job_type=#attributes.board_type#&sort_col=approvedbydate&sort_order=#attributes.sort_order#','pageDiv'); return false;">LiveDate</a></th>
<th ><a href="" onClick="javascript: ColdFusion.navigate('dspPagesDiv.cfm?job_type=#attributes.board_type#&sort_col=old_tt_id&sort_order=#attributes.sort_order#','pageDiv'); return false;">Old TT ID</a></th>
<th ><a href=""

Open in new window

0
Comment
Question by:lantervj
  • 11
  • 4
15 Comments
 
LVL 39

Expert Comment

by:gdemaria
ID: 34918880

Is the section you've called "The Div" supposed to be the "dspPagesDiv.cfm" file ?

At the beginning of that file you should place a cfparam tag for each url variable that you might pass

<cfparam name="url.board_type" default="">

That way if you don't pass it, it will not error
0
 

Author Comment

by:lantervj
ID: 34919252
I added a dump, after doing a cfparam of all the passed variables, of the URL scope and the selectJobTitle is in there but I still get an error

<cfparam name="url.board_type" default="2" />
<cfparam name="url.selectJobID" default="" />
<cfparam name="url.selectCompanyName" default="" />
<cfparam name="url.selectJobTitle" default="" />
<cfparam name="url.selectMarketer" default="" />

<cfdump var="#url#"><cfabort>

<cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
      <cfinvokeargument name="board_type" value="#url.board_type#">
      <cfinvokeargument name="selectJobID" value="#url.selectJobID#">
      <cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
      <cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
      <cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
      <cfinvokeargument name="sort_order" value="#attributes.sort_order#">
      <cfinvokeargument name="sort_col" value="#attributes.sort_col#">
      <cfinvokeargument name="start" value="#variables.start#">
      <cfinvokeargument name="stop" value="#variables.stop#">
</cfinvoke>


struct
SELECTCOMPANYNAME       [empty string]
_cf_clientid                               C240440137357E786B00CC5B5A8F468D
_cf_containerId                       pageDiv
_cf_nocache                       true
_cf_nodebug                       true
_cf_rc                                       0
board_type                               Custom
selectCompany_Name       [empty string]
selectJobID                               [empty string]
selectJobTitle                       [empty string]
selectMarketer                       0
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 34919361
You also have attribute variables that may be undefined?

I'd like to pin down whether the error is in the code you are showing or the cfc

Let's comment out the cfc call and just cfoutput it (I intentionally removed the first < from each tag so it would just display to the screen).

Please show the error message if it happens..

<cfparam name="url.board_type" default="2" />
<cfparam name="url.selectJobID" default="" />
<cfparam name="url.selectCompanyName" default="" />
<cfparam name="url.selectJobTitle" default="" />
<cfparam name="url.selectMarketer" default="" />

<cfdump var="#url#"><cfabort>

<cfoutput>
cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
      cfinvokeargument name="board_type" value="#url.board_type#">
      cfinvokeargument name="selectJobID" value="#url.selectJobID#">
      cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
      cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
      cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
      cfinvokeargument name="sort_order" value="#attributes.sort_order#">
      cfinvokeargument name="sort_col" value="#attributes.sort_col#">
      cfinvokeargument name="start" value="#variables.start#">
      cfinvokeargument name="stop" value="#variables.stop#">
/cfinvoke>
</cfoutput>

<!--------
<cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
      <cfinvokeargument name="board_type" value="#url.board_type#">
      <cfinvokeargument name="selectJobID" value="#url.selectJobID#">
      <cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
      <cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
      <cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
      <cfinvokeargument name="sort_order" value="#attributes.sort_order#">
      <cfinvokeargument name="sort_col" value="#attributes.sort_col#">
      <cfinvokeargument name="start" value="#variables.start#">
      <cfinvokeargument name="stop" value="#variables.stop#">
</cfinvoke>
------->

Open in new window

0
 

Author Comment

by:lantervj
ID: 34919620
cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
 cfinvokeargument name="board_type" value="Custom">  
cfinvokeargument name="selectJobID" value="">  
cfinvokeargument name="selectCompanyName" value="">  
cfinvokeargument name="selectJobTitle" value="">  
cfinvokeargument name="selectMarketer" value="0">  
cfinvokeargument name="sort_order" value="Asc">  
cfinvokeargument name="sort_col" value="">  
cfinvokeargument name="start" value="0">  
cfinvokeargument name="stop" value="20">
 /cfinvoke>
0
 

Author Comment

by:lantervj
ID: 34919699
This popup error is not recorded in the cf log file
cfdiverror.bmp
0
 

Author Comment

by:lantervj
ID: 34919752
BTW;  the page does return data. It's just that the bind failed.  In fact, the original post from me meant I was getting an error page returned from the server.  This new error is just an AJAX popup error with very little to go on.  
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 34919761
That error seems to be associated with this tag...

<cfdiv bind="url:dspPagesDiv.cfm?selectJobID={selectJobID}&selectCompany_Name={selectCompany_Name}&selectJobTitle={selectJobTitle}&selectMarketer={selectMarketer}&board_type={board_type}" id="pageDiv" />


selectJobTitle={selectJobTitle} <!===== this value

what is that pointing to?

Do you have a CFINPUT tag named "selectJobTitle" ?
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.

 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 34919780
> This new error is just an AJAX popup error with very little to go on.

add &cfdebug=1 to the end of your web browsers URL to see more info

0
 

Author Comment

by:lantervj
ID: 34920110
This is part of the divSearchParms.cfm that contains the cfinputs;

<div style="background-color:ebebeb; align:center;">
<table>

  <tr>
            <td>
                  <table  style="font-size:7;">
                        <tr>
                      <td align="center">Job ID:</td>
                      </tr>
                      <tr>
                      <td><cfinput type="text" name="selectJobID" size="8"></td>
                        </tr>
                  </table>
            </td>
            
            <td>
                  <table style="font-size:7;">
                        <tr>
                      <td align="center">Company Name:</td>
                      </tr>
                      <tr>
                      <td><cfinput type="text" name="selectCompany_Name"></td>
                        </tr>
                  </table>
            </td>
            <td>
                        <table style="font-size:7;">
                              <tr>
                                    <td><strong>Job Title:</strong></td>
                              </tr>
                              <tr>
                            <td><cfinput type="text" name="selectjobTitle" />
                                    </td>
                              </tr>
                        </table>                  
                  </td>
            <td>
                  <table style="font-size:7;">
                        <tr>
                              <td align="center">Marketer:</td>
                              </tr>
                              <tr>
                              <td><cfselect name="selectMarketer" size="1">
                                                <option value="0" selected>
                                                      All
                                                </option>
                                                <cfoutput>
                                                <cfloop query="getAdmins">
                                                      <option value="#getAdmins.adminid#">
                                                            #getAdmins.name#
                                                      </option>
                                                </cfloop>
                                                </cfoutput>
                                          </cfselect></td>
                        </tr>
                  </table>
            </td>
      
0
 

Author Comment

by:lantervj
ID: 34920186
URL variables from the debug output;
URL Parameters:
CFID=1001613
CFTOKEN=80089461
board_type=Custom    <----------  the only url param that was passed for the bind
cfdebug=1
comingfrom=modify
fa=home
0
 

Author Comment

by:lantervj
ID: 34920238
From the debug window;
info:widget: Selected tab, id: cf_layoutarea1297974020175 in tab container, id: Modify Job

info:http: HTTP GET dspPagesDiv.cfm?selectJobID=&selectCompany_Name=&selectJobTitle=&selectMarketer=0&board_type=Custom&_cf_containerId=pageDiv&_cf_nodebug=true&_cf_nocache=true&_cf_clientid=C240440137357E786B00CC5B5A8F468D&_cf_rc=0

info:http: Replacing markup for element: pageDiv from URL dspPagesDiv.cfm?selectJobID=&selectCompany_Name=&selectJobTitle=&selectMarketer=0&board_type=Custom with params _cf_containerId=pageDiv

error:bind: Element not found: selectJobTitle

error:bind: Bind failed, element not found: selectJobTitle

info:widget: Selected tab, id: cf_layoutarea1297974020173 in tab container, id: New Job

info:widget: Selected tab, id: cf_layoutarea1297974020169 in tab container, id: companySelect

info:widget: Firing selection change event for grid id: compGrid

info:widget: Created grid, id: compGrid

info:LogReader: LogReader initialized

info:global: Logger initialized
0
 

Author Comment

by:lantervj
ID: 34920683
0
 

Author Comment

by:lantervj
ID: 34920689
0
 

Author Comment

by:lantervj
ID: 34920697
0
 

Author Comment

by:lantervj
ID: 34923138
I wish I knew exactly what fixed the problem, but it works now.  One BIG problem was the spelling of the element name selectJobTitle.  I use a lower case "j" and that caused one of the 2 errors that the element could not be found.  But, after correcting the spelling I still got one error that the same element could not be found.  I renamed the passing variable name to xselectJobTitle and the error reflected that name so the error was directly related to the CFDIV statement.  I noticed that I had the element board_type defined twice in the bind string.  After fixing that and removing all use of cflayout,  the error went away.  Making one change at a time is the best debuggin technique, but we all fall prey to the frustration.  Anyway,  thanks for hanging in with me.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

15 Experts available now in Live!

Get 1:1 Help Now