It is definitely ColdFusion.getElementValue. The first arg would be
the name of the grid, and the second the column name.

On 8/20/07, Jim Rising <[EMAIL PROTECTED]> wrote:
> I have a grid that i'm trying to add buttons beneath using suggestions found
> on forta's blog:
>
> http://www.forta.com/blog/index.cfm/2007/6/25/ColdFusion-Ajax-Tutorial-6-Editable-Data-Grids#c763CC6AA-3048-80A9-EF18B27922ED5460
>
> Basically at this point, i'm just trying to alert out the value of the
> selected row using javascript. On Forta's blog, it is suggested that this
> can be accomplished using ColdFusion.Bind.getElementValue(<gridid>,
> <column>). I was unable to find this in the DOM, but did find
> ColdFusion.Bind.getBindElementValue() as well as ColdFusion.getElementValue().
> Neither of these produce the results I'm needing.
>
> Here is what I'm doing:
>
> <script type="text/javascript" language="javascript">
>     function myFunction()
>     {
>      var myVar = ColdFusion.Bind.getBindElementValue('accountants',
> 'first_name')
>      alert(myVar)
>     }
> </script>
>
> <cfset windowTitle = viewstate.getValue("xe.windowTitle")>
>
> <cfwindow initshow="true" draggable="false" width="400" height="300"
> title="#windowTitle#" x="0" y="200">
>     <cfform method="post" format="html">
>     <cfformgroup type="panel" label="Accountants">
>
>     <cfgrid name="accountants" format="html" pagesize="5" striperows="true"
> bind="cfc: 
> translator.controller.controller.getAdvisors({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},
> 3)" delete="true" selectmode="edit" onchange="cfc:
> translator.controller.controller.setAdvisor({cfgridaction},{cfgridrow},{cfgridchanged})">
>         <!--- <cfgridcolumn name="checked" header="Delete" type="boolean">
> --->
>         <cfgridcolumn name="app_advisorInfo_id" display="no" >
>         <cfgridcolumn name="app_advisorType_id" >
>         <cfgridcolumn name="first_name">
>         <cfgridcolumn name="last_name">
>         <!---
>         <cfgridcolumn name="Relationship">
>         <cfgridcolumn name="Specialty">
>         <cfgridcolumn name="Agency">
>         <cfgridcolumn name="address">
>         <cfgridcolumn name="address2">
>         <cfgridcolumn name="City">
>         <cfgridcolumn name="State">
>         <cfgridcolumn name="zipcode">
>         <cfgridcolumn name="phone">
>         <cfgridcolumn name="country">
>         <cfgridcolumn name="fax">
>         <cfgridcolumn name="notes">
>         <cfgridcolumn name="fiduciaryType">
>         <cfgridcolumn name="cs_user_id">
>         <cfgridcolumn name="isPrimary">
>         --->
>     </cfgrid>
>     <input type="button" name="approve" value="approve"
> onclick="myFunction()">
>     </cfformgroup>
>
>     </cfform>
>
> </cfwindow>
>
> Here is the javascript error that is produced:
>
> _6b has no properties
> _cf_getAttribute(undefined)cfgrid.js (line 218)
> getBindElementValue("accountants", "first_name" , undefined, undefined,
> undefined)cfajax.js (line 334)
> myFunction()index.cfm (line 277)
> onclick(click clientX=0, clientY=0 )
>
> without the quotes around 'accountants' and 'first_name' ...
>
> i get:
>
> accountants is not defined
> myFunction()index.cfm (line 277)
> onclick(click clientX=0, clientY=0)
>
> which i assume is possibly because the actual ID for the grid is this random
> ID?
>
> Jim Rising
> Sr. Cold Fusion Developer
> ICGLink Inc.
> www.icglink.com
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286649
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to