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:
  #1  
Old October 16th, 2004, 01:37 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: 5
Setting contents of array with multi value

I am putting form values in an array. Here is the code of the form value I am using...

<!---
<cfinput name="answer#i#.#j#">
--->

I have no probs with this!

When I try to stick it in an array like this..
<!---
<CFLOOP from="1" to="#SESSION.NumOfAwnz#" index="r">


<CFSET NumOfAwn[r]=#form['answer' & i & . & r]#>

</CFLOOP>
--->

I get this error...
<!---
Invalid CFML construct found on line 53 at column 65.
and it states "ColdFusion was looking at the following text:.The CFML compiler was processing:

* an expression beginning with "\'", on line 53, column 50.This message is usually caused by a problem in the expressions structure.
* an expression beginning with "#", on line 53, column 44.This message is usually caused by a problem in the expressions structure.
* a CFSET tag beginning on line 53, column 26.
* a CFSET tag beginning on line 53, column 26.
* a CFSET tag beginning on line 53, column 26.



LINE 53 is of course...
<CFSET NumOfAwn[r]=#form['answer' & i & . & r]#>


ANY IDEAS ON HOW TO SET THIS VARIABLE CORRECTLY????

Reply With Quote
  #2  
Old October 16th, 2004, 10:16 PM
Alas's Avatar
Alas Alas is offline
Wickedwd.com
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: wickedwd.com
Posts: 187 Alas Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 17 h 32 m 22 sec
Reputation Power: 0
try this

<CFSET NumOfAwn[r]= '#form['answer' & i & . & r]#'>

(NOTICE difference is ' ' around what u had

if it doesn't work buy beer it always helps.

-Alas

Reply With Quote
  #3  
Old October 17th, 2004, 07:18 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 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 16 h 33 m 51 sec
Reputation Power: 53
Try this:

<CFSET NumOfAwn[r]=#form['answer#i##r#']#>
__________________
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 > Setting contents of array with multi value


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 1 hosted by Hostway
Stay green...Green IT