Using the external object in a CETerm script running on a Windows Mobile OS platform device does not seem to work correctly. The same script works correctly on Windows CE OS platform devices.
This variable is pre-defined on Windows CE OS platform. It must be defined on Windows Mobile OS platform.
On Windows Mobile OS platform, when instantiating a new external object through CEBrowseX, you need to do this only one time for the page. Repeat creation of CEBrowseX on the same page should be avoided.
You cannot make an assignment to "external" on some newer Windows Mobile platforms.
// Resolve ext reference *one* time, when page loads
var ext = null; // global variable, not declared in a function
if (typeof external === "object")
// Windows CE
// external is already defined in global namespace
ext = external;
// Windows Mobile
// Create CEBrowseX for external access
ext = new ActiveXObject("Cebrowsex.IdaCtl");
// Example to use the external object reference in your script or functions
//TODO: Handler logic