Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
A suggestion:
<head>
<script type="text/javascript" src="/CFIDE/scripts/ajax/package/cfajax.js"></script>
</head>
Copy link to clipboard
Copied
I gave that very line of code a try, and all it seems to do is make the page load hang. The dev console shows it in the queue to load or being loaded, but that's about it.