Skip to main content
Version: v11.6.2

Using JavaScript from External URL


Loading external JS libraries

For example, a custom Demo Spinner.

/* perform any action on widgets/variables within this block */

Page.onReady = function () {
// For Setting values for External Spinner
var opts = {
lines: 15,
length: 28,
width: 14,
radius: 42,
scale: 1,
corners: 1,
color: '#000',
opacity: 0.25,
rotate: 0,
direction: 1,
speed: 1,
trail: 60,
fps: 20,
zIndex: 2e9,
className: 'spinner',
top: '50%',
left: '50%',
shadow: false,
hwaccel: false,
position: 'absolute'
};

var target = document.getElementById('Demo');
var spinner = new Spinner(opts).spin(target);
};

Using an external url to load the JS file

//cdnjs.cloudflare.com/ajax/libs/spin.js/1.2.7/spin.min.js

See Also

How to use JavaScript to Use Expressions for Binding
How to load JavaScript from external URLs
How-To insert/update multiple rows in a database using a FOR loop in JavaScript