Solved

Passing Variables at the end of form to a new page.

Posted on 2001-08-15
8
141 Views
Last Modified: 2013-12-24
Let me clarify,
after my form has been submitted I have a page that would say your data has been posted.  underneath that I would like to have a text link that once pressed would carry over some variables that were created on the previously submitted form, so they can then be used as hidden fields used to update a table on the new page via a form.

Now I have tried all Basic ways of carrying over a variable ie <input type="hidden/text" name="My field" value="#previously created#">

that did not work..

so I tried creating a query that would pull that value out of the db and then carrying it over with the text link. that did not work.  if any one can show me the syntax or pointme in the right direction it would be greatly appreciated.
0
Comment
Question by:jriver12
  • 3
  • 3
  • 2
8 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 50 total points
Comment Utility
You have 3 options:

1. Set the information  in Session and retrieve it on the next page.

2. Set the information as hidden params in a form (that is invisible) but make the form submit via clicking the link:
<a href="javascript:void(0);" onClick="document.myHiddenForm.submit();">Click to Continue</a>

3. URL Encode the vars in the  link:

Create a list of var and value combos.

<a href="nextpage.cfm?<CFOUTPUT>#URLENCODE(mylist)#</CFOUTPUT>">Click to Continue</a>
0
 

Author Comment

by:jriver12
Comment Utility
CheekyCJ
do you live on this site?
you seem to always jump on to my questions.  not that I have a problem with that.  

I am trying your suggestions now.  I'll get back.
0
 
LVL 3

Expert Comment

by:TEFKASG
Comment Utility
Or you could just pass the variable through the URL as such:

<a href="GoTopage.cfm?data1=<cfoutput>#data1# </cfoutput> &data2=<cfoutput>#data2#</cfoutput>
&data3=<cfoutput>#data3#</cfoutput> "> link text </a>
Etc.

:>)
0
 
LVL 19

Expert Comment

by:cheekycj
Comment Utility
Yup, that was my 3rd option.

I don't live on this site.. I just check in :-)

CJ
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Expert Comment

by:TEFKASG
Comment Utility
>>Yup, that was my 3rd option.

  Except I am just doing it manually, without using #URLENCODE(mylist)#, so it is not EXACTLY the same way of doing it.  :>)
0
 
LVL 3

Expert Comment

by:TEFKASG
Comment Utility
But it does exactly the same thing.  :>)
0
 

Author Comment

by:jriver12
Comment Utility
cheekycj
thanks again you guys on EE are awsome.
0
 
LVL 19

Expert Comment

by:cheekycj
Comment Utility
TEFKASG: Yup.

jriver12: Thanx.  We try our best :-)

CJ
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now