2 Replies Latest reply on Oct 13, 2014 5:50 AM by Golden Jet

    Why is cfajax.js not *initially* loading in mobile platform/version?

    Golden Jet

      I am on a team developing and supporting a CF10 web application that is used on both desktop and mobile (iPad) platforms.  I have a form with 2 CFSELECTs which are bound to CFCs.

       

      There are views for both the desktop and mobile version.  They are virtually identical *except* for the mobile form fields are in <div> tags instead of an HTML table.  They both use the same CFSELECT code:

       

      <cfoutput>
      <cfselect name="region" selected="#rc.region#" bind="cfc:applications.theApp.model.services.myApp.getRegions('#rc.DSN#',{district})" bindOnLoad="true">
      </cfselect>
      </cfoutput>

       

       

      The desktop version works as expected, the region options change based on the 'district' select box option,but the mobile version will not work on initial page load. 

       

      Using Chrome to emulate the mobile version, I noticed in the console that cfajax.js does not load the first time the page is accessed.  The CFSELECT form fields shows no options.

       

      But, if I F5 refresh the page, cfajax.js does load.  The CFSELECTs appear to show no options *until* I click on them, and even then they don't quite behave correctly.

       

      Why doesn't cfajax.js load on the initial page access?

       

      Any help or suggestions would be greatly appreciated!