• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Coldfusion.window.hide clearing form struct

Explorer ,
May 18, 2010 May 18, 2010

Copy link to clipboard

Copied

I have an ecommerce site. I have terms and conditions/disclaimer info that I put in a cfwindow tag. The cfwindow is hidden initially and I open it with coldfusion.window.show. Everything works just fine. The problem occurs when I close the window. It closes just fine with the 'X' in the upper right corner, but I also built a button to close it using coldfusion.window.hide. When this is clicked, it closes the window, puts x and y variables in the url and clears the form struct. I have some form variables displaying on the page. So the net result is that when the cfwindow is closed, the page refreshes and some info is missing from the page that comes from the form. Anyone else run into this?

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2010 May 18, 2010

Copy link to clipboard

Copied

I don't see how those actions you describe (which all happen on the client side) can affect the form scope, which is on the server. Especially givn By the time any of that code is on the client machine and running, the form scope is already long dead (as is everything else to do with generating the response that gets sent to the client browser an then executed.

Are you sure you're identifying what the problem (and the sequence of events leading up to the problem) actually is?

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 19, 2010 May 19, 2010

Copy link to clipboard

Copied

Here is the exact flow...I get to my confirm page which has a link where I am using coldfusion.window.show to display a disclaimer. This works fine. The checkout page displays form variables from the previous step in the checkout process. When I click on a button within my cfwindow that uses coldfusion.window.hide, the window closes and the screen refreshes and my form struct is empty.        

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 24, 2010 May 24, 2010

Copy link to clipboard

Copied

Anyone have any thoughts on this yet?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 24, 2010 May 24, 2010

Copy link to clipboard

Copied

... the screen refreshes and my form struct is empty

FORM data does not persist across multiple requests. So depending on what you mean by "refresh" it is entirely possible the FORM scope will be (and should be) empty after you refresh the screen.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 24, 2010 May 24, 2010

Copy link to clipboard

Copied

LATEST

To combine both Adam's and cfsearching's answer.

The form scope only exists during the response built by ColdFusion when the form request was received.  As soon as that response is finished and sent to the web server to be forwarded back to the client browser, ColdFusion has thrown out the form scope and moved on to a completely new request (or is waiting for a new request).

Any future requests from the original client, either Ajax requests from cfwindow wizardry, or refreshes of the whole page will not have access to that previous form request, unless you do something yourself to repeat the form header information in this new request.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation