Hi,
When you use the cfhttp tag to post information to a web page, at the same time as you
are using the cfloop tag, the page will submit the wrong number of variables to the
page depending on which iteration you are going through in the loop. For example, if
you are on the second iteration of the loop, the page will post two sets of variables,
if you are on the third iteration it will submit three sets of variables. I’m not
sure why. It may be a problem with one of the cf tags, or a problem that occurs when
the two tags interact. I'm not sure if there is another possible way to perform the
same functionality as the cfloop, iteration, without using the cfloop tag or maybe
there is another possible solution to this?
Here is an example of the problem.
CFLOOP INDEX = n FROM = 1 TO = 2
CFHTTP METHOD = POST URL =
http://www.computing.surrey.ac.uk/cgi-bin/R.Peel/getpost.pl; PATH = c:\ FILE =
result#n#.html
CFHTTPPARAM TYPE = FORMFIELD NAME = user VALUE = hello
CFHTTPPARAM TYPE = FORMFIELD NAME = 'product VALUE = product1
/CFHTTP
/CFLOOP
The url above submits two variables to a page. This page tells you what variables were
submitted. Two files are generated. In the first it shows that one set of variables
were submitted. In the second “result2.html” it shows that two sets of variables
were submitted. I think if I can find another way to perform a loop, I will not have
to use these two tags together, but there may be another solution.
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4