I am trying to do this. After submitting a form I would like to return to a previous URL that contained URL parameters. What is the best way to do this? Is there a way to save the URL and then recall it later?
Thanks! I think that did it. I have been looking for this solution for the last week. I am curious...since I am new with Dreamweaver and Coldfusion, what language is that? It's not cfml right?
do a search on google or your favorite search engine for cgi variables +coldfusion...there are a bunch of them which will allow you to do different things...
Glad I could help, God knows people on this board has help me alot through the years....
Okay, so this is where I am at. I did what you recommended and it is working - sort of.
Upon submitting the form it takes me back to the webpage+parameters that I want to go to, but it doesn't seem to update the table. When I use Coldfusion's built in Update Form Wizard and point the 'After Submitting Webpage' to the webpage without parameters upon submitting, the table is updated.
In other words, when I use the script you recommended, it give me my url parameters back, but doesn't seem to update the table when I submit the form.
I got it to work. Turns out I needed to insert this into the Form's ACTION:
<cfoutput>#CurrentPage#?#MyUrl#</cfoutput>
Now that you have showed me the "cfcookie" function, I am trying to do something with it. I have a few checkboxes the user can select, and am woundering if selected, can the checkbox's value be stored as a cookie, or multiple cookies?
Thanks so far, you have fixed something I have been trying to work on for a week!
so yo can store the value to more than one cookie...
you should also use cfparam for you checkboxes..if you going to try to add them to a database or use them for processing...
cause if one is not checked and is not cfparamed, it will generate an error
I did copied what you wrote and the good thing is no error messages. But also, nothing is being displayed. These are the same 2 pages that I have been working on from the beginning. Once I submit the form, it updates the database and now (thanks to you) returns to the saved URL via the form's action. However none of the cookie variable's are displaying.
I checked the debugger, and it says for cookies 1-4 all the values are still "0". Meaning the checkbox's values aren't getting sent to the webpage for some reason. Any ideas?
If you place CFCOOKIE and CFLOCATION on the same action page the cookie will not set. The page actually has to stop processing before the cookie gets recorded.
Last night when I was working on my site I accidentally deleted one of the pages and have spent the last 4 hours remaking it. That's the bad news, the good news is some issues I am having right now are digging up some of the dirt that was in my code.
I think you guys are right and the cflocation is playing havec on the cookies. Of the two pages I am working with now one has a dynamic table generated thru coldfusion's dynamic table wizard, and the other is an update form created thru the wizard as well. I have looked and the update form wizard inserts a cflocation at the top of the page. I think it is being used as part of the action to figure out where to go once the form is submitted.
So right now I am having the same problem I talked about previously, where the URL parameters save, but based on how I fill out the update form wizard - I can either 1)submit the form,utilize the cookie, return to the page with dynamic table, which DOESNT update the table, or 2) submit the form, which stays on the current update form page, but DOES update the table.
Should I insert this where coldfusion's wizard inserted cflocation? Even though the cfcookie name="MyUrl".... is on one webpage (the dynamic table) and the cflocation is on the other (the update form)?
You're good. I got it the update table to update my table and recognize the stored URL cookie by replacing cflocation with the javascript you recommended. Thanks!
Now I am inputting the cfcookie code to diplay the cookie's stored checkbox variable that you wrote. I typed it all in but its still not displaying the cookie. The value for the cookie1 according the debugger is still '0'.
When does the cookie1,2... get the values from the checkboxes? Since cookie1,2,... are only referenced on the dynamic table page (where they are displayed) and not on the page where the checkbox's are located, how/when are the value passed? Do I need to insert the cookies on the form page?
Here is the code for my form update page. I am thinking I need to insert the cookie1,2,... somewhere where so it will retain the check box value so I can display it on another page. What do you think?
Yeah, I took those out already because I read somewhere those don't really need to be there and should be taken out. Still, the cookie's value is still "0", I am guessing from the <cfparam name="Time.M_0300_AM" default="0"> I set at the top of the page i want to display the cookie on (in a dynamic table).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.