ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old April 14th, 2005, 06:38 AM
elise_driver elise_driver is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Norwich
Posts: 53 elise_driver User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 27 m 10 sec
Reputation Power: 5
Unhappy populating text boxes with image upload

Hi,

I have a form that uploads 4 images to the remote server and then populates 4 seperate text boxes in another form with the image names.

It uploads the images properly but puts the same image name into all 4 text boxes (the name of the 4th image uploaded)

The code that puts the image names in is:

function set_file_name()
{
if (window.opener)
{
window.opener.document.form1.image1.value = "<cfoutput>#cffile.serverfile#</cfoutput>" ;
window.opener.document.form1.image2.value = "<cfoutput>#cffile.serverfile#</cfoutput>" ;
window.opener.document.form1.image3.value = "<cfoutput>#cffile.serverfile#</cfoutput>" ;
window.opener.document.form1.image4.value = "<cfoutput>#cffile.serverfile#</cfoutput>" ;
return true ;
}

return false ;
}


It,s called at the bottom of the page before the closing </body> tag:

<script language="JavaScript">
set_file_name() ;
</script>


Hope someone can help.

Regards

Peter

Reply With Quote
  #2  
Old April 14th, 2005, 08:32 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
Assuming that you are looping on the action page and doing a cffile for each image, I believe you need to copy the relevant info from each cffile call into another varible (an array perhaps) becuase each cffile overwrites the one before it. So yes, after the last cffile runs the file name will just be the same as the last one. Is this the problem you're having or am I misunderstanding you?
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > populating text boxes with image upload


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway