15 Replies Latest reply on Jul 19, 2017 6:56 AM by JWogan

    CFWINDOW problem

    CF_Oracle Level 1
      Can't figure out why in two cfwindows created from main page, calendar in cfinput type="datefield" behaves differently depending on ORDER in which they created. Calendar icon became inactive in the second window if the first one was called and then closed. (The input field is still active for manual data entry). But if main page refreshed it's active again. In the first window the calendar active at any time without refreshing main page and when called in any order. These 2 windows are identical. Bahavior is the same with any settings of cfwindow attriburtes like refreshOnShow (true or false) and others. And if to switch the order of windows creation in main page, the calendar in the other pop-up window became frozen and first one previously inactive works fine. Is it a bug in CF8?
      This is code in main page:
      <cfajaximport tags="cfwindow, cfform, cfinput-datefield" >
      <cfwindow title="WindowName1"
      name="MyName1"
      height="380"
      modal="false"
      refreshOnShow="true"
      initShow="false"
      source="../MySource1.cfm"/ >

      <cfwindow title="WindowName2"
      name="MyName2"
      height="380"
      modal="false"
      refreshOnShow="true"
      initShow="false"
      source="../MySource2.cfm"/ >

      Calles for pop-up windows:
      <a href="#" onclick="javascript:ColdFusion.Window.show(MyName1);">Title 1</a>
      <a href="#" onclick="javascript:ColdFusion.Window.show(MyName2);">Title 2</a>

      in called windows:
      <cfform>
      <cfinput type="datefield" name="FieldName1">
      .......
      </cfform>

      <cfform>
      <cfinput type="datefield" name="FieldName2">
      .......
      </cfform>




        • 1. Re: CFWINDOW problem
          TiGGi Level 1
          I've tried using cfWindow and I found out that it's too buggy. It would work on FF but it wouldn't on IE and vice versa. And then when you add flash forms into it it just goes crazy. don't worry, there is perfect solution for it, CF_Window custom tag, it's free and it works great.
          http://cfwindow.riaforge.org/
          • 2. Re: CFWINDOW problem
            CF_Oracle Level 1
            TiGGi, thank you for quick reply. Yes it works fine in Fireforks browser but our client has IE. We'll see what Adobe will say on this issue.
            • 3. Re: CFWINDOW problem
              I find cfwindow buggy as well. And considering the touting that cf8 has cool features for Use Experience, I believe Adobe can do better if they put in more and Better resources into it. As a community we would all benefit from it... Unfortunately it seems that Adobe has adopted a "raising cows" business model for creating zillions of products. Another strategy would be partially "raising cows" but still got flagship products including Cold Fusion 8...
              this strategy would be a win-win for Adobe and us.
              • 4. Re: CFWINDOW problem
                Level 7
                yeah, sure, we all know better what Adobe should do and how than Adobe
                does... :)

                as for cfwindow and other cf8 ajax ui components - they are based on
                ExtJS 1.0 js library. you can leverage pretty much any of the library's
                functionality with a bit of digging and js coding... it is not that hard
                and there are a lot of blogs on the subject.

                you can, of course, use a different js library if you want to - they all
                a relatively easy to implement. jQuery is my personal favourite...

                on a brighter side, i hear that cf8 updater1 will include updated ExtJS
                with a more and betetr built-in out-of-the-box functionality... but
                don't hold me to that - i assume it can al change still before the
                release...


                Azadi Saryev
                Sabai-dee.com
                http://www.sabai-dee.com/
                • 5. Re: CFWINDOW problem
                  I heard on March 8 that the updater would be out "Very shortly..." but then I heard it would be early April. Digging deep into any of these libraries for me mainly involves with Opportunity Cost...

                  Were you able to find a workaround for the iframes inside a cfwindow problem?
                  • 6. Re: CFWINDOW problem
                    AlwaysWannaLearn
                    Just like those before mine, I'm also having issues using <cfwindow> and <form>. I have my <cfwindow> appearing fin in both IE and FF, my issue is doing a validation on the form fields. As soon as the person hits the submit button, the parent page refreshes. If the validation fails the user has no idea unless they click the link again, which is a shotty implementation. I'm forced to do all my validations via JS...
                    • 7. Re: CFWINDOW problem
                      Azadi,

                      After weighing options, I've decided to tackle the related YUI and Ext libraries (mainly Ext) pertaining to the CFWINDOW tag.
                      a) find them all (done);
                      b) minik the cfwindow script, removed the CFWINDOW tag call line -- the first line (done);
                      b) put my iframes related js on top of them, put the miniked cfwindowNew.js as the last script (done);

                      Tried,
                      results: no error but NOT working (the fancy presentation / CSS not present). I suspect problem lies with the b) step.

                      Thoughts?

                      Thanks.
                      • 8. Re: CFWINDOW problem
                        Level 7
                        @ AlwaysWannaLearn:

                        rtfm:

                        using <form> tag will submit to the form to the main page
                        using <cfform> tag will submit the form to the ajax ui control the form
                        is displayed in


                        Azadi Saryev
                        Sabai-dee.com
                        http://www.sabai-dee.com/
                        • 9. Re: CFWINDOW problem
                          Level 7
                          ghfftttyyudsderycv76,
                          can you describe what is your problem with iframes?
                          i am a bit lost... ca't figure out what you are talking about or find
                          your other post where you describe the problem...

                          Azadi Saryev
                          Sabai-dee.com
                          http://www.sabai-dee.com/
                          • 10. Re: CFWINDOW problem
                            Azadi,

                            If you have a javascript that set iframe designMode to On and its src to some dynamic data value and then point a cfwindow's source to the following template, you'll see the iframe's would not be activated. But the js and the following template would work just fine outside cfwindow. Thanks. Don

                            main page
                            <form id="nutsFrm" method="post">
                            <iframe name="out" id="out" src="Untitled1.html" contenteditable="true" style="width:300px; height:150px"></iframe><br/>
                            </form>

                            <form id="nutsFrm2" method="post">
                            <iframe name="nuts2" id="nuts2" style="width:300px; height:150px"></iframe><br/>
                            </form>
                            • 11. Re: CFWINDOW problem
                              Level 7
                              Don,

                              I will play with it later. It's 1AM here and I am a wee bit tired...
                              Will try to have a look at it tomorrow...


                              Azadi Saryev
                              Sabai-dee.com
                              http://www.sabai-dee.com/
                              • 12. Re: CFWINDOW problem
                                Sure thing, Azadi, thanks. Don
                                • 13. Re: CFWINDOW problem
                                  AlwaysWannaLearn Level 1
                                  quote:

                                  Originally posted by: Newsgroup User
                                  @ AlwaysWannaLearn:

                                  rtfm:

                                  using <form> tag will submit to the form to the main page
                                  using <cfform> tag will submit the form to the ajax ui control the form
                                  is displayed in


                                  Azadi Saryev
                                  Sabai-dee.com
                                  http://www.sabai-dee.com/



                                  Wow. I did not know that. Do I need to include or import in some ajax script in order to do this? So simply the <cfform> will submit to the same <cfwindow> instance so if the server-validation fails I can present the appropriate error message, or if everything went OK, display a "thanks" message?
                                  • 14. Re: CFWINDOW problem
                                    Level 7
                                    @ AlwaysWannaLearn:

                                    yes, correct.
                                    read this:
                                    http://www.coldfusionjedi.com/index.cfm/2007/10/31/Ask-a-Jedi-Why-isnt-my-form-reloading-t he-whole-page

                                    then read through the cf8 cfml reference/cf8 developers guide (both
                                    freely downloadable from adobe.com) for more info

                                    hth

                                    Azadi Saryev
                                    Sabai-dee.com
                                    http://www.sabai-dee.com/
                                    • 15. Re: CFWINDOW problem
                                      JWogan Level 1

                                      I know this is an old post but I'm working with cfwindows in CF11, and I may have just figured out the problem.  After 9 years, I imagine it won't help the original poster, but what the hey.

                                       

                                      In my project,  I have two CFWindows that allow the user to select the series of checkboxes and associate the records to two different data points.  So let's say I'm working with widgets that can go either into product A or product B.

                                       

                                      If the user comes to the page and opens the cfwindow "Widgets in Product A", they make their selections, save, and all is good.  Likewise, if they come to the page and open the cfwindow "Widgets in Product B" and save, again, all is good.

                                       

                                      But if the user comes to the page, opens A and then opens B, things break.  On saving, B sees not only the widgets selected in current cfwindows, but also in previous cfwindow.

                                       

                                      Thought I was losing my mind, but the conclusion I came to was that A CFWINDOWS'S HTML REMAINS IN THE DOM AFTER THE WINDOW IS CLOSED. Perhaps not news to everyone, but it was to me.

                                       

                                      My guess is the original problem lay in using the same id name for a field in both windows causing the JavaScript to use an unintentional value.  Making the var names unique worked for me. Hope this helps.

                                       

                                      Regards,

                                      Jeff Wogan