Copy link to clipboard
Copied
In my CFWindow I have a couple of dependent dropdowns that is built by cfselect bind operation. The CFwindow opens using a Javascript on click of a link. In my parent window I have several links each opens the same cfwindow (same codebase) and I put diffrent window name while poping up the window to avoid caching issue. Now when I open the first cfwindow all cfselect drop downs and binding works fine. Then I close that cfwindow using the
Copy link to clipboard
Copied
The problem is the windows have different names. I had a similar issue on a page I had that called two different CFWindows on the same parent page. Both had different names, and both used the onclick to call a JS function(two different JS functions), that used ColdFusion.Windows.Create. Even though I set destroyOnClose = true and had code to close and destroy the windows, for some reason it was causing issues on the binds. Everything but the binds worked. The page has three different edit windows on it and only the two that have binding broke. I am using CF 9. For this fix to work you need to know the name of the window. However, by using this method, you most likely would not have to use dynamic window names, because the window will be destroy on the onclick. For your example I would just use the same window name. Then put the try catch code below at the top of the function. But if you have different window names opening on the same parent page, it's best to give each one a try catch of it's own. I hope this makes sense.
This might help: http://www.coldfusionjedi.com/index.cfm/2008/9/26/Ask-a-Jedi-Another-CFWINDOW-Example
In my Javascript I have these lines at the beginning
try { ColdFusion.Window.destroy('WindowName1',true); }
catch(e){}
try { ColdFusion.Window.destroy('WindowName2',true); }
catch(e){}
Then i have the code to create my window. I put this line of code in both Javascript functions.