|
Hi,
I
would be careful trusting that both lists would be the same - imagine if some
one blanks out one of the price text boxes - the price list would be n -1. [As
CF removes blank list entries]
how
about explicity naming the price boxes, i.e.
<input type="Text" name="price_#productid#" value="#unitprice#"
size="5" maxlength="10">
then your action cfm could loop through the form to find all the
price_x fields and parse the productid out of the field name before
doing the updating.
i.e.
<!--- this is nasty stuff - got to love old evaluate!
--->
<cfif isdefined("form.updateprice")>
<cfset Variables.stPriceUpdates = StructNew()> <cfloop index="i" list="#FORM.PRODUCTID#"> <cfset Variables.thisValue = Evaluate("Form.Price_#i#")> <cfif Len(Trim(Variables.thisValue))> <!--- valid, non-blank string ---> <cfset StructInsert( Variables.stPriceUpdates,"#i#", #Variables.thisValue#)> </cfif> </cfloop> <cfdump var="#Variables.stPriceUpdates#"> </cfif>
cheers
David
--- 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/ |
Title: Message
- [cfaussie] RE: NEW batch style update request Clifton Steve
- [cfaussie] RE: NEW batch style update request Steve Onnis
- [cfaussie] Re: NEW batch style update request phaddon
- [cfaussie] RE: NEW batch style update request stone
- [cfaussie] RE: NEW batch style update request Clifton Steve
- [cfaussie] RE: NEW batch style update request Whiterod, David (DTUP)
- [cfaussie] RE: NEW batch style update request Whiterod, David (DTUP)
- [cfaussie] RE: NEW batch style update request Steve Onnis
- [cfaussie] RE: NEW batch style update request stone
- [cfaussie] RE: NEW batch style update request Steve Onnis
- [cfaussie] RE: NEW batch style update request stone
- [cfaussie] RE: NEW batch style update request Aaron DC
- [cfaussie] RE: NEW batch style update request Steve Onnis
- [cfaussie] RE: NEW batch style update request stone
- [cfaussie] RE: NEW batch style update request Clifton Steve
- [cfaussie] RE: NEW batch style update request stone
