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:
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 DevelopersDownload Now!
  #1  
Old November 14th, 2004, 12:58 PM
mikemac mikemac is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Greenville NC
Posts: 70 mikemac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 15 m 24 sec
Reputation Power: 4
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>

Reply With Quote
  #2  
Old November 14th, 2004, 01:59 PM
mikemac mikemac is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Greenville NC
Posts: 70 mikemac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 15 m 24 sec
Reputation Power: 4
Exclamation

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.

Reply With Quote
  #3  
Old November 14th, 2004, 02:56 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,514 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 3 Days 21 h 17 m 26 sec
Reputation Power: 45
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

Reply With Quote
  #4  
Old November 14th, 2004, 06:59 PM
mikemac mikemac is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Greenville NC
Posts: 70 mikemac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 15 m 24 sec
Reputation Power: 4
Quote:
Originally Posted by kiteless
Take out the cfoutputs...

<!---This is the error ridden line--->
filefield="form.#Session.TestWiz.QuesImg[cc]#"


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!!!!!!

Reply With Quote
  #5  
Old November 14th, 2004, 07:52 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,514 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 3 Days 21 h 17 m 26 sec
Reputation Power: 45
If you do a cfdump of "Session.TestWiz" what do you see?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Array element not found


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





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