Java test

A first script reads an external file called 'jbank1.js'. The file simply contains four variables 'proc_b', 'result_b', 'date_b' and 'datenarr_b'.

The second script reads the first two variables from the external file and passes them directly to the paragraph which contains an ID label (bank_cm)...

A paragraph to be manipulated

The third script calculates the difference between todays date and the 'date_b' variable. The result of the calculation determines the red or green background colouring of the paragraph (ID = 'bank_p') ...

A paragraph to be manipulated

Note that the javascript Date functions are case sensitive and must be typed correctly. Also, a date variable cannot be entered as DD/MM/YYYY - it must be MM/DD/YYYY.

A page containing useful information about javascripts and dates is