That's not a CFFILE filefield. That's an HTML form element of the type
file.  It's a standard HTML problem.  I think most people dislike it but
you get used to it. 


John Burns
Certified Advanced ColdFusion MX Developer
Wyle Laboratories, Inc. | Web Developer
 

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 04, 2005 3:34 PM
To: CF-Talk
Subject: RE: Anything wrong with this statement?

Ok...I got this part figured out...now the users can click "Add Another
Photo"
and the page resubmits and adds another CFFILE filefield and caption
field...
I know this could be done more elegantly in JavaScript...but I'm no
JS'er...

You know, it's too bad the CFFILE file selection dialog won't let you
choose more than one file at a time...I was going to try to select
multiple files, then loop through the list and upload them that
way...the idea being that a user could simply select say 20 photos and
the CFFILE filefield would contain the list of files, then I loop over
the list using the comma as the delimiter, and voila, a single selection
of all the photos at once...but, as I quickly found out, the selection
dialog won't do multiple selects...bummer...

Rick


-----Original Message-----
From: RADEMAKERS Tanguy [mailto:[EMAIL PROTECTED]
Sent: Monday, April 04, 2005 1:10 PM
To: CF-Talk
Subject: RE: Anything wrong with this statement?


the Photos variable isn't persistent (not a session, cookie, application
or whatever variable) so it's being redefined as 0 by the cfparam with
every request to the page. My suggestion (quick and dirty) would be to
put it in a hidden form field or pass it in the url.
/t

>-----Original Message-----
>From: Rick Faircloth [mailto:[EMAIL PROTECTED]
>Sent: Monday, April 04, 2005 7:07 PM
>To: CF-Talk
>Subject: RE: Anything wrong with this statement?
>
>> What happens if it is passed in with a non-numeric value ...
>
>   Wouldn't happen...the variable is used only on a page which
>   is submitting back to itself.  No other pages are utilizing it.
>   Its default is set to 0, the formula runs, adding 1 to the value,
>   and then it gets incremented up 1 if the "Add Another Photo"
>   button is clicked...
>
>   Trying to work out a CF solution to allowing a user to add more
>   CFFILE fields to a page when they click a button.
>
>   When the page is submitted back to itself, the variable is upped 1,
>   and a CFLOOP is run creating the amount of CFFILE fields
>   specified by the variable, "Photos".
>
>   Seems simple...but so far it's not working.  I'm just missing
>   something at this point...
>
>   Rick
>
>
>
>-----Original Message-----
>From: Aaron Rouse [mailto:[EMAIL PROTECTED]
>Sent: Monday, April 04, 2005 12:48 PM
>To: CF-Talk
>Subject: Re: Anything wrong with this statement?
>
>
>I'd think "importance" would be subjective as to who was looking at it.

>I personally try to always do it like this:
>
><cfset Photos = Variables.Photos + 1 />
>
>But I got into the habbit of putting in Variables due to working with 
>inherited code that lacks much of any scoping.  So I'd maybe come 
>across a page with references to Photos but have no idea if they were 
>expecting it to come in via the URL, FORM, or whatever.  In some really

>rare cases they might have had:
>
><cfparam name="Photos" default="0" />
>
>But I'd still not have any idea where they were expecting it to come 
>from with that.
>
>All your CFPARAM is doing before the set is making Photos if it did not

>already exist and setting it to 0.  What happens if it is passed in 
>with a non-numeric value ...
>
>On Apr 4, 2005 11:43 AM, Rick Faircloth <[EMAIL PROTECTED]> 
>wrote:
>
>>
>> As to scoping it with variables., as in "variables.photos", why is 
>> that important?
>>
>
>
>
>





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201427
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