I spent a few hours this morning working on some code that would duplicate this issue. I have been able to determine that the problem only occurs when using ColdFusion.Window.create. Using the cfwindow tag does not produce this issue.

The code below will duplicate the issue. The first part is the script for creating a window. This code creates a new window and destroys the previous. This is because refreshOnShow:true has no effect and my window loads dynamic content. The 2nd part of the code is the window content. This has a function to get the value of the form field in the window.

On first load everything is fine. However, once you close the window and open it up again the alerted value is now a list of values.

view plain print about
1<CFAJAXIMPORT TAGS="cfwindow">
2
3<SCRIPT>
4winCounter = 1;
5winName = "window"+winCounter;
6    
7function loadWindow(){
8    winH = 400;
9    winW = 300;
10
11    try{
12        ColdFusion.Window.getWindowObject(winName).destroy();
13    } catch (err) {}
14
15    winName = "window"+winCounter;
16    winCounter = winCounter+1;
17    ColdFusion.Window.create(winName, 'test window', 'test.cfm', {refreshOnShow:true,height:winH,width:winW,modal:true,closable:true, draggable:false,resizable:false,center:true,initshow:true});
18}
19
20</SCRIPT>
21<A HREF="JAVASCRIPT: loadWindow();">LOAD WINDOW</A>

window content file test.cfm

view plain print about
1<FORM method="post" action="./test.cfm">
2    <input type="text" name="testField" id="testField" value="123" />
3</FORM>
4
5<A HREF="JAVASCRIPT: alert(ColdFusion.getElementValue('testField'));">SHOW VALUE</A>

There ya have it. Hopefully this can be addressed and fixed in future versions of CF.

--Dave