KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to check if the 4D Ajax Framework is loaded
PRODUCT: 4D Web 2.0 Pack | VERSION: 11.6 | PLATFORM: Mac & Win
Published On: June 8, 2010

When writing your own JavaScript it can be important to know whether the 4D Ajax Framework has loaded yet. The 4DAF is loaded and ready to use by the time the window.onload event fires. If a developer needs to check if the 4DAF is ready for use before that, use the following JavaScript to check:

if (typeof dax_bridge !== "undefined") {
  // 4DAF framework is ready for use
} else {
  // 4DAF framework hasn't loaded yet
}


This script checks for the presence of the bridge component, which is an essential part of the 4DAF.