Solved

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

Posted on 2001-08-15
8
142 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
ID: 6389211
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
ID: 6389275
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
ID: 6389302
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
ID: 6389343
Yup, that was my 3rd option.

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

CJ
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 3

Expert Comment

by:TEFKASG
ID: 6389374
>>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
ID: 6389375
But it does exactly the same thing.  :>)
0
 

Author Comment

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

Expert Comment

by:cheekycj
ID: 6389379
TEFKASG: Yup.

jriver12: Thanx.  We try our best :-)

CJ
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 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

13 Experts available now in Live!

Get 1:1 Help Now