This content has been marked as final. Show 4 replies
... > i want to save that as a client variable without having to post the form.
i have no problem having js/cf talking to each other with ajax, however a js change cant be saved in a cf component unless its during page creation.
cookies can be created/edited/deleted using js, so i just need to know how i would go about editing a cf created cookie using js.
> cookies can be created/edited/deleted using js, so i just need
> to know how i would go about editing a cf created cookie using js.
> client variables..works like a charm
Save and run the following code as the page testCookieJS.cfm
document.cookie="JS test cookie";
Coldfusion cookie struct dump:
You will find that the "JS cookie" is not dumped. However, you will find that the cookie is actually present in the browser.
Now, close the browser and delete all cookies. Save and run the following code as the page testCookieCF.cfm
<cfcookie name="CFCookieTest" value="CF test cookie">