Thanks for the info - I just tried the onChange="#gridtotaller#" and setting up the cfsavecontent thing - and when I save the form, it won't display after a refresh. I'm trying to understand the cfsavecontent bit here - isn't the variable it saves that, and not a function name that I should be calling durn an onChange? Could I do this instead:

<cfgrid name="stock"... onChange="var total=0;

     for(var i = 0; i < GridData.dataProvider.length; i++)
      {
         total = total + stock.dataProvider[i]['SharesStart'];
     }
     total_field = total;">

Chris Velevitch wrote:
If the grid is called Stock, then:-

<cfsavecontent variable="gridtotaller">
     var total=0;

     for(var i = 0; i < datagrid.dataprovider.length; i++)
      {
         total = total + stock.dataprovider[i]["columname"];
     }
     total_field = total;
 </cfsavecontent>

 ...

<cfgrid name="stock"... onChange="#gridtotaller#">...</cfgrid>

The attribute dataprovider is an array objects that is used to display
the values in the rows and the attribute names in each row object
should match each of the <cfgridcolumn name="..."> tags.


Chris

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to