Hi All,
I am trying to use the CFLOOP command for a page on my site, but am having trouble pulling a value from my database. This is my code below:
<FORM NAME="Pages">
<SELECT NAME="PageNo" SIZE="1" onchange="go2()">
<CFLOOP INDEX="SectionPages" FROM="1" TO="#SectionPages#">
<CFOUTPUT>
<OPTION VALUE="#SectionNo#/#SectionNo#-#NumberFormat('#SectionPages#',"00"
#.jpg">#SectionNo#-#NumberFormat('#SectionPages#',"00"
#</OPTION>
</CFOUTPUT>
</CFLOOP>
</SELECT>
</FORM>
The '#SectionPages#' clause is a field in the database which contains the total number of pages for each section. For example, SectionNo "GI" contains 19 pages, SectionNo "A" contains 7 Pages, etc etc.
If I want the pull down menu list to show the correct number of pages in that specific section, the CFLOOP TO value should be the total number of pages in that particular section, which is why I am using the value of '#SectionPages#'.
I get an error from CF however saying it can't evaluate the expression?
Any ideas on what I am doing wrong?
Regards,
Jeff Aycan - MX-3.com
I am trying to use the CFLOOP command for a page on my site, but am having trouble pulling a value from my database. This is my code below:
<FORM NAME="Pages">
<SELECT NAME="PageNo" SIZE="1" onchange="go2()">
<CFLOOP INDEX="SectionPages" FROM="1" TO="#SectionPages#">
<CFOUTPUT>
<OPTION VALUE="#SectionNo#/#SectionNo#-#NumberFormat('#SectionPages#',"00"
</CFOUTPUT>
</CFLOOP>
</SELECT>
</FORM>
The '#SectionPages#' clause is a field in the database which contains the total number of pages for each section. For example, SectionNo "GI" contains 19 pages, SectionNo "A" contains 7 Pages, etc etc.
If I want the pull down menu list to show the correct number of pages in that specific section, the CFLOOP TO value should be the total number of pages in that particular section, which is why I am using the value of '#SectionPages#'.
I get an error from CF however saying it can't evaluate the expression?
Any ideas on what I am doing wrong?
Regards,
Jeff Aycan - MX-3.com