Skip to main content
Inspiring
October 27, 2008
Question

ColdFusion.Window.destroy issues

  • October 27, 2008
  • 1 reply
  • 612 views
I have been trying to get this to work, and I am not able to get a working solution. I have tried all weekend to no luck.
Heres what Im doing>

I have a page that I have a href link that i have opening a CFwindow loading a page. That is working. What i would like to do is be able to once the CFWindows closes, that it will destroy the window instance, so that if I wanted to navigate to another page, then back to that page, the window would be new. The window name is static and needs to stay static if all possible.

Here is some test code i'm working on. I'm trying to have it so that once the user hits the 'x' to hide the window, it will destroy itself. Its going to be a file rename page, so I'm also doing a page refresh in there. I can work on that later, but for now, Im just trying to get the window to destroy.

Anyone have a suggestion on what to try?


    This topic has been closed for replies.

    1 reply

    Fernis
    Inspiring
    October 29, 2008
    With CF 8.0.1, you can use ColdFusion.Window.destroy(windowname);

    That'll fix your problem. Hope this helps. :)
    Participant
    October 29, 2008
    I didn't know you could destroy windows, but I have been getting around the same problem via javascript, and having it just navigate the already created window to a CFM page that I pass arguments to, allowing it to change the page in the cfwindow. Example:

    function navigate_CFWindow(sID, action) {
    if (action == "edit") {
    ColdFusion.navigate('SOPEditor.cfm?sop='+sID+'&action=edit', 'SOPEditor_body');
    ColdFusion.Window.show('SOPEditor');
    }

    seems to work just fine :)