• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Explorer ,
Oct 08, 2014 Oct 08, 2014

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!

TOPICS
Advanced techniques

Views

359

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 12, 2014 Oct 12, 2014

Copy link to clipboard

Copied

A suggestion:

<head>

<script type="text/javascript" src="/CFIDE/scripts/ajax/package/cfajax.js"></script>

</head>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 13, 2014 Oct 13, 2014

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation