[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

url parameters

I am submitting an html form to a cfm page. url would be like this :
http://localhost/mycfm.cfm?answer1=myfirstanswer&answer2=mysecondanswer&numberofanswers=2
using the amount of questions variable how can I pull out my values and put them into a cf variable on the page ?
My problem is with the cfparam tag.
if I do this :
<cfparam name = answer#1#> this line is fine but I can't access the variable as its being created dynamically. Is thiere some other way to do this like request.getattribute("answer1") ????


Thanks
Spunog
0
spunog
Asked:
spunog
  • 2
  • 2
1 Solution
 
CFDevHeadCommented:
refer to this paq
http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20746590.html 

If this does not work let me know.
0
 
spunogAuthor Commented:
say theres a variable in the url called answer1 , I need to pull that out of the url but I am creating the variable name by doing answer#i# . If I try and access the variable answer#i# I get errors !!
Thanks
Spunog
0
 
CFDevHeadCommented:
<cfoutput>
#evaluate('answer'& i)#
</cfoutput>
0
 
spunogAuthor Commented:
Thanks a lot Buddy !
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now