Hello Adrian,

The Array defiantly contains some data, it seems to have an issue with my
syntax, I get the following error.

Message Invalid CFML construct found on line 10 at column 75. 
Detail ColdFusion was looking at the following text:
[

The CFML compiler was processing:

an expression beginning with "VARIABLES.ViewState.getValue", on line 10,
column 36.This message is usually caused by a problem in the expressions
structure.
The body of a cfoutput tag beginning on line 10, column 26.
The body of a cfoutput tag beginning on line 10, column 26.
The body of a cfoutput tag beginning on line 10, column 26.

Thanks again.

Rob

-----Original Message-----
From: Adrian Lynch [mailto:[EMAIL PROTECTED] 
Sent: 26 March 2007 14:50
To: CF-Talk
Subject: RE: Looping Over Array

Do this before the loop

<cfdump var="#VARIABLES.ViewState.getValue("Errors")#">

Does it output an array? If so:

<cfoutput>#ArrayLen(VARIABLES.ViewState.getValue("Errors"))#</cfoutput>

Does it contain anything? (The dump would show this anyway, but...)

What's not happening anyway?

Adrian

-----Original Message-----
From: Robert Rawlins - Think Blue
[mailto:[EMAIL PROTECTED]
Sent: 26 March 2007 14:40
To: CF-Talk
Subject: Looping Over Array


Hello Guys,

 

I've got an array sat in my ViewState that I'm trying to loop over it and
output the elements, but I can't get it working, silly I know.

 

      <cfif VARIABLES.ViewState.exists("Errors")>

            <cfloop from="1"
to="#arrayLen(VARIABLES.ViewState.getValue("Errors"))#" index="i">

 
<cfoutput>#VARIABLES.ViewState.getValue("Errors")[i]#</cfoutput><br />

            </cfloop>

      </cfif>

 

Any help would be greatly appreciated guys,

 

Rob





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273715
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to