You really don't even need the val() function.
Using a foreach loop dramatically increases the speed of looping through
collections.

<form action="myform.cfm" method="post">
        <input type="text" name="quantity_1">
        <input type="text" name="quantity_2">
        <input type="text" name="quantity_3">
        <input type="text" name="quantity_4">
        <input type="submit" name="submit">
</form>

<cfscript>
        if(isDefined('form.fieldnames')) {
                // remove elements that you don't want
                structDelete(form,'fieldnames');
                structDelete(form,'submit');
                structDelete(form,'searchstring');
                for(it IN form) {
                        writeOutput(it & ':' & form[it] & '<br />');
                }
        }
</cfscript>



Warmest Regards,
 
Phillip B. Holmes
http://phillipholmes.com


=====================>




-----Original Message-----
From: Mike Kear [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 17, 2006 6:49 PM
To: CF-Talk
Subject: Re: Evaluate vs ?

What's the matter with using evaluate?

Cheers
Mike Kear
Windsor, NSW, Australia
Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month



On 4/18/06, Stan Winchester <[EMAIL PROTECTED]> wrote:
>
> Thanks everybody! I thought it was something like that.
>
> >> <cfloop index="i" from="1" to="#FORM.itemsOnPage#">
> >>   <set Quantity = val(Evaluate("FORM.Quantity_" & i)) /> </cfloop>
>
>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237969
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to