Quite.....a quick fix would be to create one form with two hidden fields where you update the ID of the item and the method you want to perform...
Maybe? -----Original Message----- From: Paul Swingewood [mailto:[EMAIL PROTECTED] Sent: 12 August 2004 13:37 To: [EMAIL PROTECTED] Subject: Re: [ cf-dev ] Form Submission Problem Yeah I can see it now. I needed to do this as I use the same results page for modify & delete. I think maybe a code restructure is needed here. Regards - Paul >From: [EMAIL PROTECTED] >Reply-To: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Subject: Re: [ cf-dev ] Form Submission Problem >Date: Thu, 12 Aug 2004 13:32:48 +0100 > > >you're looping through your query: ><cfoutput query="getItems"> > >so if you have > 1 record returned in that query, you will have multiple >forms, all with the same name and form field names. Which isn't a good >idea. Make sure each form is uniquely name, perhaps: > ><CFFORM name="hiddenValues#getItems.CurrentRow#" ACTION="moditemform.cfm" >METHOD="POST"> > > > > > > "Paul Swingewood" > <[EMAIL PROTECTED] To: >[EMAIL PROTECTED] > tmail.com> cc: > Subject: [ cf-dev ] >Form Submission Problem > 12/08/2004 13:25 > Please respond to > dev > > > > > >I have the following code > ><cfif getitems.recordcount gt 0> > <cfoutput query="getItems"> > <tr> > <!--- bgcolor="##ffcdef" ---> > <td width=75 rowspan=4> > > <cfswitch >Expression="#form.ItemAction#"> > ><cfcase value="modify"> > ><CFFORM name="hiddenValues" ACTION="moditemform.cfm" METHOD="POST"> > > <input type="hidden" name="ItemAction" value="modify"> > > <input type="hidden" name="itemID" value="#getitems.itemID#"> > > <a href="javascript:document.hiddenValues.submit()"> > > <img name="#itemName#" src="../images/products/#itemImage#" >width="75" height="75" style="background-color: ##CC66FF"> > > </a> > ></cfform> > ></cfcase> > ><cfcase value="delete"> > ><CFFORM name="hiddenValues" ACTION="delitemform.cfm" METHOD="POST"> > > <input type="hidden" name="ItemAction" value="delete"> > > <input type="hidden" name="itemID" value="#getitems.itemID#"> > > <a href="javascript:document.hiddenValues.submit()"> > > <img name="#itemName#" src="../images/products/#itemImage#" >width="75" height="75" style="background-color: ##CC66FF"> > > </a> > ></cfform> > ></cfcase> > </cfswitch> > > </td> > <td width="1" rowspan=4> > <img src >="../images/spacer.gif" width="1" align="top"> > </td> > </tr> > <tr> > <td valign="top">Item Name >:</td> > <td Valign="top"> >#getitems.ItemName#</td> > </tr> > <tr> > <td valign="top">Part Number >:</td> > <td valign="top"> >#getitems.partnum#</td> > </tr> > <tr> > <td valign="top">Item ID :</td> > <td valign="top"> >#getitems.itemID#</td> > </tr> > </cfoutput> > <cfelse> > Sorry no items were found with that ItemID or Part >Number > </cfif> > > > >The form is submitted ok if only one item is returned in getItems. It >doesn't work when multiple items are returned. I just get the error on page > >(standard non helpful JS error). Can anyone see why this should be please? > >Regards - Paul > > > >-- >These lists are syncronised with the CFDeveloper forum at >http://forum.cfdeveloper.co.uk/ >Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > >CFDeveloper Sponsors and contributors:- >*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided >by activepdf.com* > *Forums provided by fusetalk.com* :: *ProWorkFlow provided by >proworkflow.com* > *Tutorials provided by helmguru.com* :: *Lists hosted by >gradwell.com* > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > >-- >These lists are syncronised with the CFDeveloper forum at >http://forum.cfdeveloper.co.uk/ >Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > >CFDeveloper Sponsors and contributors:- >*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided >by activepdf.com* > *Forums provided by fusetalk.com* :: *ProWorkFlow provided by >proworkflow.com* > *Tutorials provided by helmguru.com* :: *Lists hosted by >gradwell.com* > >To unsubscribe, e-mail: [EMAIL PROTECTED] > -- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED] This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED]