Skip to main content
HessWebTech
Known Participant
May 19, 2010
Question

Coldfusion.window.hide clearing form struct

  • May 19, 2010
  • 2 replies
  • 1612 views

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?

    This topic has been closed for replies.

    2 replies

    HessWebTech
    Known Participant
    May 24, 2010

    Anyone have any thoughts on this yet?

    Inspiring
    May 24, 2010

    ... 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.

    Inspiring
    May 19, 2010

    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

    HessWebTech
    Known Participant
    May 19, 2010

    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.