|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
pass form value to next page with cflocation method?
Hi guys,
I have one page with an insert record behaviour, on that page there's a form value i want to pas to the next page. the first page is redirecting with cflocation.... Can anyone give me an example of working with parameters or another method zo that i can get the form value from the first page to the next.... |
|
#2
|
|||
|
|||
|
Last time I tried you can not push a value with CFlocation the same way you can with just a regular link.
From the sound of it you're trying to do this. <a href="gotonextpage.cfm?url=#var1#"> you can't do that in a... <cflocation url="enterurlhere"> because it will treat whatever is in the URL as the exact url...so if you do <cflocation url="gotonextpage.cfm?url=#var1#"> it will tell you that gotonextpage.cfm?url=#var1# page does not exsist, because it is looking for a file named exactly that. |
|
#3
|
|||
|
|||
|
The thing thats bad about cflocation is that you have to submit a value over a URL. By resubmitting another form, you are able to keep the value out of the URL. By the way, yes you can pass variables which need to be parsed through cflocation.
Code using cflocation BUT showing variable in URL: Code:
<cfset email = "test@test.com"> <cfset pw = "testpassword"> <cflocation url="http://halo.tcln.com?variable=#email#&pw=#pw#" addtoken="no"> Code resending info without using the URL: Code:
<form action="index.cfm" method="post" name="theForm" id="theForm"> <input type="hidden" name="email" value="<cfoutput>#FORM.email#</cfoutput>"> <input type="hidden" name="pw" value="<cfoutput>#FORM.pw#</cfoutput>"> </form> <script> document.theForm.submit(); </script> Remember when you use <script>, the code is Case Sensitive. Notice the forms name is "theForm". Notice "theForm" in the <script> is also the same Case. Enjoy, Wes |
|
#4
|
|||
|
|||
|
hi guys, thanx for your help and sorry for my late response, this is very usable!!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > pass form value to next page with cflocation method? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|