I have a complex data entry page in which I use the cfwindow
tag several times to produce 3 different modal windows. Cfwindow is
being used to provide access to lookup tables for several different
fields in a form (the cfwindow tags, however, are employed on the
page outside the form tags), so there is a different cfwindow for
each field and each cfwindow has a unique name attribute value.
Much of the time, this works fine. But perhaps one out of
four times that I refresh the page, cf appears to get confused
about which cfwindow to open. One cfwindow is named MetroAirports,
another is named Coordinators and a third other is named
produces when the page is rendered. You'll note that CF creates a
_cf_window_init.. variable for each window.
Note that the value of this variable is the same for the
second two windows: 1227286702850. To the end user, the result is
that CF will not produce the second window, CommunityCoordinators,
properly; it's size and formatting is messed up. And when it it
closed, it won't close properly (it appears to "partially" close,
leaving the rest of the page inaccessible).
I can reproduce this problem...but as I mentioned, it only
happens 25-30% of the time. Anyone have any clues as to what is
going on here?
Okay, as usual, I'm solving my own problems, heheh. Probably
best this way though...
The problem is that there is a bug in cfwindow when calling
it from inside a custom tag when you use the tag more than once on
a given page.
When CF produces a page on which you have used cfwindow, CF
creates special divs--each uniquely named--for each cfwindow you've
defined. When you use cfwindow multiple times to produce
different-named windows on the same page, CF is smart about only
including these ext JS script files
But when you are calling cfwindow
from inside a custom tag, it appears that CF will include
the same ext scripts once for each time you use cfwindow; probably
because each instance of usage is "unaware" of any other uses of
cfwindow because the custom tag "isolates" them from the rest of
the code in the page. Eventually CF "gets confused" and starts
naming the divs incorrectly.