[FX.php List] Creating summaries on the fly,
Kevin Futter
kfutter at sbc.melb.catholic.edu.au
Tue Aug 22 21:02:11 MDT 2006
On 23/8/06 12:42 PM, "Bob Patin" <bob at patin.com> wrote:
> I've created a form that loops through the found set and creates
> summaries on the fly, but here's a question:
>
> My client wants percentages next to each summary; the rub, however,
> is that I don't know the total for the "category" until all the
> subsummaries are done. In other words, it's like this:
>
> Car model A ---- total=3
> Car model B ---- total =7
>
> Total car models = 10
>
> So how do I go back and put 30% next to Car Model A, since I don't
> have the total <10> until all 10 records are looped through?
>
> Would the only way be to use some Javascript to put the values there?
>
JavaScript could work, with the potential problem that JS-disadvantaged folk
won't see anything. I think if it were me, I'd try putting the whole FM call
and data processing loop in a function, which also returns a variable
containing the final figures you need. That way you can take the function's
output (containing the FM data and your custom variable/s) and process and
display them as required. Of course, I say all this off the top of my head
and without any insight into how your code currently works.
--
Kevin Futter
Webmaster, St. Bernard's College
http://www.sbc.melb.catholic.edu.au/
------------------------------------------
This e-mail and any attachments may be confidential. You must not disclose or use the information in this e-mail if you are not the intended recipient. If you have received this e-mail in error, please notify us immediately and delete the e-mail and all copies. The College does not guarantee that this e-mail is virus or error free. The attached files are provided and may only be used on the basis that the user assumes all responsibility for any loss, damage or consequence resulting directly or indirectly from the use of the attached files, whether caused by the negligence of the sender or not. The content and opinions in this e-mail are not necessarily those of the College.
More information about the FX.php_List
mailing list