File: js/remote_loader.js

Recommend this page to a friend!
  Classes of Martin Latter   JavaScript Monitor URL Changes   js/remote_loader.js   Download  
File: js/remote_loader.js
Role: Example script
Content type: text/plain
Description: Example script
Class: JavaScript Monitor URL Changes
Display the status of accessing a URL in a page
Author: By
Last change: Update of js/remote_loader.js
Date: 2 years ago
Size: 426 bytes
 

Contents

Class file image Download
/** * Set-up onload event handler for traffic light monitoring an external URL. */ window.addEventListener('load', function() { "use strict"; var sRemoteURL = "http://www.bbc.co.uk/", iCheckInterval = 2000, // 2 secs oTrafficLight1 = new TrafficLight(), sTL1 = oTrafficLight1.create("traffic-light-1"); oTrafficLight1.monitor(sRemoteURL, iCheckInterval, sTL1); }, false);