|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Learn five alternative approaches for automating the delivery of Excel-based reports. Read all about it in the free whitepaper: “Automating Excel Reports: Five Approaches for Java Developers” Download Now!
|
|
#1
|
|||
|
|||
|
Array element not found
I am using a Structure-Array to hold values. When I call an element of the array I get an error staing the element cant be found. I can't see why it says element not found, Its a SESSION variable all CF has to do is look in memory and "wow" there is the element. Anyone out there find the flaw with this. Any help would be unbelievably awesome!!! Here is my code...
<!---This is the first part of my file upload page, when I view the sourcecode of this page the name is perfect!!---> <cfloop from="1" to="#NumOfQues" index="j"> <TR bgcolor="FFFF99"> <CFSET Session.TestWiz.QuesImg[j]="#SESSION.TestWiz.testName#QuesImg#j#"> <TD> Question(#j#) image: </TD> <TD> <input type="file" name="<CFOUTPUT>#Session.TestWiz.QuesImg[j]#</CFOUTPUT>" </TD> </cfloop> ------------------------------------------------------------------------------------------------ here is the fileAction.cfm page <CFLOOP from="1" to="#SESSION.TestWiz.NumberOfQuest#" index="cc"> <cffile action="upload" destination="#GetDirectoryFromPath(GetBaseTemplatePath())#" <!---This is the error ridden line---> filefield="form.<CFOUTPUT>#Session.TestWiz.QuesImg[cc]#</CFOUTPUT>" nameconflict="makeunique"> </CFLOOP> |
|
#2
|
|||
|
|||
|
I have in my hand a crisp new US Dollar bill !!!! It will gladley be given to the first user to provide a solution or a idea as to how to solve the problem.
![]() |
|
#3
|
|||
|
|||
|
Take out the cfoutputs...
<!---This is the error ridden line---> filefield="form.#Session.TestWiz.QuesImg[cc]#"
__________________
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 |
|
#4
|
|||
|
|||
|
Quote:
I thought of that too, same error "The element at position 1 cannot be found. The error occurred on line 21." Thanks for the response. Its the little things that throw ya in the coding game. You finally get your head around a concept and a hidden syntax error hides for days, killing the moral!!!!!! |
|
#5
|
|||
|
|||
|
If you do a cfdump of "Session.TestWiz" what do you see?
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Array element not found |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|