|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > populating text boxes with image upload |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|